mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 05:41:55 +00:00
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: fae3006e4b
("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>
This commit is contained in:
parent
b0b7d28158
commit
0958351e93
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user