diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-04-03 09:17:05 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-04-03 09:25:02 -0700 |
commit | e2c3ecf0ea8e87c5209371af7da107ebc47a5639 (patch) | |
tree | 2fbc7035d343ba5a4728e4b017510fbda7288e28 /drivers/input | |
parent | 7bbdba56ba9e01e610f7455c0375f9bbef84f3b1 (diff) |
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: fd335ab04b3f ('Input: edt-ft5x06 - add support for M09 firmware version')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Acked-By: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/edt-ft5x06.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 75b666bd265..f8815bebc9e 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -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, |