]> 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 b06185ed18959941de78c299ce3a8aaac44a2cb2..9fb6b86cf6b15970ede185e8233a975dd4049d8a 100644 (file)
@@ -57,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)