Skip to content

Commit

Permalink
Input: lm8323 - missing error check in lm8323_set_disable()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Dmitry Torokhov committed Dec 3, 2014
1 parent 939ffb1 commit 3b5005e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/input/keyboard/lm8323.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3b5005e

Please sign in to comment.