summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-02-16 20:29:05 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-03 16:44:19 +0100
commitfb176d32f8afc553a58d18902062a392b74e9b14 (patch)
tree3ffe84b03be8fd3cd9aa4ba2e1293f5d5a6c4b8d /drivers/input
parent25e2012955b29f389086e465a93c350ae2552c0f (diff)
Input: elo - fix an error code in elo_connect()
[ Upstream commit 0958351e93fa0ac142f6dd8bd844441594f30a57 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/input')
-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 8051a4b704ea..e2e31cbd6b2c 100644
--- a/drivers/input/touchscreen/elo.c
+++ b/drivers/input/touchscreen/elo.c
@@ -345,8 +345,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;