Commit e2c3ecf0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dmitry Torokhov

Input: edt-ft5x06 - add a missing condition

The if condition was accidentally deleted here so we return every time
instead of returning on error.

Fixes: fd335ab0 ('Input: edt-ft5x06 - add support for M09 firmware version')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarJingoo Han <jg1.han@samsung.com>
Acked-By: default avatarLothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 7bbdba56
......@@ -291,9 +291,10 @@ static int edt_ft5x06_register_read(struct edt_ft5x06_ts_data *tsdata,
wrbuf[1] = tsdata->factory_mode ? addr & 0x7f : addr & 0x3f;
wrbuf[1] |= tsdata->factory_mode ? 0x80 : 0x40;
error = edt_ft5x06_ts_readwrite(tsdata->client,
2, wrbuf, 2, rdbuf);
return error;
error = edt_ft5x06_ts_readwrite(tsdata->client, 2, wrbuf, 2,
rdbuf);
if (error)
return error;
if ((wrbuf[0] ^ wrbuf[1] ^ rdbuf[0]) != rdbuf[1]) {
dev_err(&tsdata->client->dev,
......
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