]> err.no Git - linux-2.6/blobdiff - lib/kobject_uevent.c
V4L/DVB (7758): ivtv: fix oops when itv->speed == 0 and VIDEO_CMD_PLAY is called
[linux-2.6] / lib / kobject_uevent.c
index 0d56dad319ad33b8354c1396866158a6a0de4c91..9fb6b86cf6b15970ede185e8233a975dd4049d8a 100644 (file)
 #include <linux/kobject.h>
 #include <linux/module.h>
 
-#ifdef CONFIG_NET
 #include <linux/socket.h>
 #include <linux/skbuff.h>
 #include <linux/netlink.h>
 #include <net/sock.h>
-#endif
 
 
 u64 uevent_seqnum;
@@ -59,7 +57,7 @@ int kobject_action_type(const char *buf, size_t count,
        enum kobject_action action;
        int ret = -EINVAL;
 
-       if (count && buf[count-1] == '\n')
+       if (count && (buf[count-1] == '\n' || buf[count-1] == '\0'))
                count--;
 
        if (!count)