Commit 0958351e authored by Dan Carpenter's avatar Dan Carpenter Committed by Dmitry Torokhov

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: fae3006e ("Input: elo - add support for non-pressure-sensitive touchscreens")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YBKFd5CvDu+jVmfW@mwandaSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent b0b7d281
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment