aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kobject_uevent.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kobject_uevent.c')
-rw-r--r--lib/kobject_uevent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 5a402e2982af..5b6d7f6956b9 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -55,7 +55,7 @@ int kobject_action_type(const char *buf, size_t count,
55 enum kobject_action action; 55 enum kobject_action action;
56 int ret = -EINVAL; 56 int ret = -EINVAL;
57 57
58 if (count && buf[count-1] == '\n') 58 if (count && (buf[count-1] == '\n' || buf[count-1] == '\0'))
59 count--; 59 count--;
60 60
61 if (!count) 61 if (!count)