Input: lm8323 - missing error check in lm8323_set_disable()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 3 Dec 2014 05:55:53 +0000 (21:55 -0800)
committerDmitry 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

index cb32e2b506b71956e08fd1d947d0584d427f4034..21bea52d4365797a602f27e2f2f7c514540c0120 100644 (file)
@@ -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;