diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-12-03 06:55:53 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-12-04 00:28:26 +0100 |
commit | 3b5005e9206af245033e9209eee193f3d7b2f636 (patch) | |
tree | 7abcd9b5828d8f9c4a9c52696bcc93910e2b5187 /drivers/input | |
parent | Input: initialize device counter variables with -1 (diff) | |
download | linux-3b5005e9206af245033e9209eee193f3d7b2f636.tar.xz linux-3b5005e9206af245033e9209eee193f3d7b2f636.zip |
Input: lm8323 - missing error check in lm8323_set_disable()
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>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/lm8323.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c index cb32e2b506b7..21bea52d4365 100644 --- 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; |