From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Lothar Waßmann" <LW@KARO-electronics.de>
Cc: Henrik Rydberg <rydberg@euromail.se>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Fugang Duan <B38611@freescale.com>,
Jingoo Han <jg1.han@samsung.com>,
linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch v2] Input: edt-ft5x06 - add a missing condition
Date: Thu, 03 Apr 2014 01:37:12 +0000 [thread overview]
Message-ID: <20140403013712.GA28270@mwanda> (raw)
In-Reply-To: <002101cf4eda$184e85b0$48eb9110$%han@samsung.com>
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>
---
v2: removed a stray tab character
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 75b666b..9d0b324 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,
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Lothar Waßmann" <LW@KARO-electronics.de>
Cc: Henrik Rydberg <rydberg@euromail.se>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Fugang Duan <B38611@freescale.com>,
Jingoo Han <jg1.han@samsung.com>,
linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch v2] Input: edt-ft5x06 - add a missing condition
Date: Thu, 3 Apr 2014 04:37:12 +0300 [thread overview]
Message-ID: <20140403013712.GA28270@mwanda> (raw)
In-Reply-To: <002101cf4eda$184e85b0$48eb9110$%han@samsung.com>
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>
---
v2: removed a stray tab character
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 75b666b..9d0b324 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,
next prev parent reply other threads:[~2014-04-03 1:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 16:53 [patch] Input: edt-ft5x06 - add a missing condition Dan Carpenter
2014-04-02 16:53 ` Dan Carpenter
2014-04-03 1:14 ` Jingoo Han
2014-04-03 1:14 ` Jingoo Han
2014-04-03 1:37 ` Dan Carpenter [this message]
2014-04-03 1:37 ` [patch v2] " Dan Carpenter
2014-04-03 2:18 ` Jingoo Han
2014-04-03 2:18 ` Jingoo Han
2014-04-03 6:40 ` Lothar Waßmann
2014-04-03 6:40 ` Lothar Waßmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140403013712.GA28270@mwanda \
--to=dan.carpenter@oracle.com \
--cc=B38611@freescale.com \
--cc=LW@KARO-electronics.de \
--cc=dmitry.torokhov@gmail.com \
--cc=grant.likely@linaro.org \
--cc=jg1.han@samsung.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=rydberg@euromail.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.