diff options
Diffstat (limited to 'lib/kobject_uevent.c')
-rw-r--r-- | lib/kobject_uevent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index b06185ed1895..9fb6b86cf6b1 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c | |||
@@ -57,7 +57,7 @@ int kobject_action_type(const char *buf, size_t count, | |||
57 | enum kobject_action action; | 57 | enum kobject_action action; |
58 | int ret = -EINVAL; | 58 | int ret = -EINVAL; |
59 | 59 | ||
60 | if (count && buf[count-1] == '\n') | 60 | if (count && (buf[count-1] == '\n' || buf[count-1] == '\0')) |
61 | count--; | 61 | count--; |
62 | 62 | ||
63 | if (!count) | 63 | if (!count) |