projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
939ffb1
)
Input: lm8323 - missing error check in lm8323_set_disable()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Wed, 3 Dec 2014 05:55:53 +0000
(21:55 -0800)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Wed, 3 Dec 2014 23:28:26 +0000
(15:28 -0800)
The missing error handling here is not especially harmful but static
checkers complain that "i" can be used uninitialized.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/lm8323.c
patch
|
blob
|
history
diff --git
a/drivers/input/keyboard/lm8323.c
b/drivers/input/keyboard/lm8323.c
index cb32e2b506b71956e08fd1d947d0584d427f4034..21bea52d4365797a602f27e2f2f7c514540c0120 100644
(file)
--- a/
drivers/input/keyboard/lm8323.c
+++ b/
drivers/input/keyboard/lm8323.c
@@
-616,6
+616,8
@@
static ssize_t lm8323_set_disable(struct device *dev,
unsigned int i;
ret = kstrtouint(buf, 10, &i);
+ if (ret)
+ return ret;
mutex_lock(&lm->lock);
lm->kp_enabled = !i;