]> err.no Git - linux-2.6/blobdiff - lib/kobject_uevent.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6] / lib / kobject_uevent.c
index 5a402e2982afb4a1a82a28092260bb66bd921269..5b6d7f6956b98efd61d781b66675a8a6ede9f78d 100644 (file)
@@ -55,7 +55,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)