Skip to content

Commit

Permalink
Input: elo - fix an error code in elo_connect()
Browse files Browse the repository at this point in the history
[ Upstream commit 0958351 ]

If elo_setup_10() fails then this should return an error code instead
of success.

Fixes: fae3006 ("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>
  • Loading branch information
Dan Carpenter authored and gregkh committed Mar 4, 2021
1 parent 2062856 commit 0a072f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/input/touchscreen/elo.c
Expand Up @@ -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;

Expand Down

0 comments on commit 0a072f0

Please sign in to comment.