diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-02-16 20:29:05 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-04 10:26:35 +0100 |
| commit | 0a072f01e58521ebda3db03de733980f07c8f247 (patch) | |
| tree | 01ba8af7f5c346ae0bb1068e4fc186971b48fa2c /drivers/input | |
| parent | 2062856c441ccc958b141636d20e9702de5e0998 (diff) | |
| download | linux-0a072f01e58521ebda3db03de733980f07c8f247.tar.gz linux-0a072f01e58521ebda3db03de733980f07c8f247.tar.bz2 linux-0a072f01e58521ebda3db03de733980f07c8f247.zip | |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/elo.c b/drivers/input/touchscreen/elo.c index d6772a2c2d09..e396857cb4c1 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; |
