提交 303aa3c9 编写于 作者: D Dan Carpenter 提交者: Zheng Zengkai

Input: elo - fix an error code in elo_connect()

stable inclusion
from stable-5.10.20
commit 79796706ac4a7ac0807706d8515d5c3eb0bb899b
bugzilla: 50608

--------------------------------

[ Upstream commit 0958351e ]

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: NDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YBKFd5CvDu+jVmfW@mwandaSigned-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 3dc55b73
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册