linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] Input: edt-ft5x06 - add a missing condition
@ 2014-04-02 16:53 Dan Carpenter
  2014-04-03  1:14 ` Jingoo Han
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2014-04-02 16:53 UTC (permalink / raw)
  To: Dmitry Torokhov, Lothar Waßmann
  Cc: Henrik Rydberg, Grant Likely, Rob Herring, Fugang Duan,
	Jingoo Han, linux-input, kernel-janitors

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>

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,

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [patch] Input: edt-ft5x06 - add a missing condition
  2014-04-02 16:53 [patch] Input: edt-ft5x06 - add a missing condition Dan Carpenter
@ 2014-04-03  1:14 ` Jingoo Han
  2014-04-03  1:37   ` [patch v2] " Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Jingoo Han @ 2014-04-03  1:14 UTC (permalink / raw)
  To: 'Dan Carpenter'
  Cc: 'Dmitry Torokhov', 'Lothar Waßmann',
	'Henrik Rydberg', 'Grant Likely',
	'Rob Herring', 'Fugang Duan', linux-input,
	kernel-janitors, 'Jingoo Han'

On Thursday, April 03, 2014 1:54 AM, Dan Carpenter wrote:
> 
> 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>
> 
> 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,
                                                                                 ^^^^^^
I think that 'tab' is not necessary between "client," and "2,".
Others look good.

Best regards,
Jingoo Han

> +						rdbuf);
> +		if (error)
> +			return error;
> 
>  		if ((wrbuf[0] ^ wrbuf[1] ^ rdbuf[0]) != rdbuf[1]) {
>  			dev_err(&tsdata->client->dev,


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [patch v2] Input: edt-ft5x06 - add a missing condition
  2014-04-03  1:14 ` Jingoo Han
@ 2014-04-03  1:37   ` Dan Carpenter
  2014-04-03  2:18     ` Jingoo Han
  2014-04-03  6:40     ` Lothar Waßmann
  0 siblings, 2 replies; 5+ messages in thread
From: Dan Carpenter @ 2014-04-03  1:37 UTC (permalink / raw)
  To: Dmitry Torokhov, Lothar Waßmann
  Cc: Henrik Rydberg, Grant Likely, Rob Herring, Fugang Duan,
	Jingoo Han, linux-input, kernel-janitors

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,


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [patch v2] Input: edt-ft5x06 - add a missing condition
  2014-04-03  1:37   ` [patch v2] " Dan Carpenter
@ 2014-04-03  2:18     ` Jingoo Han
  2014-04-03  6:40     ` Lothar Waßmann
  1 sibling, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2014-04-03  2:18 UTC (permalink / raw)
  To: 'Dan Carpenter', 'Dmitry Torokhov'
  Cc: 'Lothar Waßmann', 'Henrik Rydberg',
	'Grant Likely', 'Rob Herring',
	'Fugang Duan', linux-input, kernel-janitors,
	'Jingoo Han'

On Thursday, April 03, 2014 10:37 AM, Dan Carpenter wrote:
> 
> 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>

Best regards,
Jingoo Han

> ---
> 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,


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch v2] Input: edt-ft5x06 - add a missing condition
  2014-04-03  1:37   ` [patch v2] " Dan Carpenter
  2014-04-03  2:18     ` Jingoo Han
@ 2014-04-03  6:40     ` Lothar Waßmann
  1 sibling, 0 replies; 5+ messages in thread
From: Lothar Waßmann @ 2014-04-03  6:40 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Dmitry Torokhov, Henrik Rydberg, Grant Likely, Rob Herring,
	Fugang Duan, Jingoo Han, linux-input, kernel-janitors

Hi,

Dan Carpenter wrote:
> 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,
> 
Acked-By: Lothar Waßmann <LW@KARO-electronics.de>


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info@karo-electronics.de
___________________________________________________________
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-03  6:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 16:53 [patch] Input: edt-ft5x06 - add a missing condition Dan Carpenter
2014-04-03  1:14 ` Jingoo Han
2014-04-03  1:37   ` [patch v2] " Dan Carpenter
2014-04-03  2:18     ` Jingoo Han
2014-04-03  6:40     ` Lothar Waßmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).