aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/elo.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-02-16 20:29:05 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-02-18 14:39:42 -0800
commit0958351e93fa0ac142f6dd8bd844441594f30a57 (patch)
tree829530a64e5e2fa8599a10525118c0d4d3adb54e /drivers/input/touchscreen/elo.c
parentInput: sur40 - fix an error code in sur40_probe() (diff)
downloadlinux-dev-0958351e93fa0ac142f6dd8bd844441594f30a57.tar.xz
linux-dev-0958351e93fa0ac142f6dd8bd844441594f30a57.zip
Input: elo - fix an error code in elo_connect()
If elo_setup_10() fails then this should return an error code instead of success. Fixes: fae3006e4b42 ("Input: elo - add support for non-pressure-sensitive touchscreens") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YBKFd5CvDu+jVmfW@mwanda Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/elo.c')
-rw-r--r--drivers/input/touchscreen/elo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/elo.c b/drivers/input/touchscreen/elo.c
index e0bacd34866a..96173232e53f 100644
--- a/drivers/input/touchscreen/elo.c
+++ b/drivers/input/touchscreen/elo.c
@@ -341,8 +341,10 @@ static int elo_connect(struct serio *serio, struct serio_driver *drv)
switch (elo->id) {
case 0: /* 10-byte protocol */
- if (elo_setup_10(elo))
+ if (elo_setup_10(elo)) {
+ err = -EIO;
goto fail3;
+ }
break;