linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: as5011 - fix error return code in as5011_probe()
@ 2013-08-23  2:54 Wei Yongjun
  2013-08-24 23:40 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-08-23  2:54 UTC (permalink / raw)
  To: dmitry.torokhov, wfp5p, broonie, shubhrajyoti, javier
  Cc: yongjun_wei, linux-input

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/input/joystick/as5011.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c
index 121cd63..262ebe2 100644
--- a/drivers/input/joystick/as5011.c
+++ b/drivers/input/joystick/as5011.c
@@ -288,6 +288,7 @@ static int as5011_probe(struct i2c_client *client,
 	if (irq < 0) {
 		dev_err(&client->dev,
 			"Failed to get irq number for button gpio\n");
+		error = irq;
 		goto err_free_button_gpio;
 	}
 


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

* Re: [PATCH] Input: as5011 - fix error return code in as5011_probe()
  2013-08-23  2:54 [PATCH] Input: as5011 - fix error return code in as5011_probe() Wei Yongjun
@ 2013-08-24 23:40 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2013-08-24 23:40 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: wfp5p, broonie, shubhrajyoti, javier, yongjun_wei, linux-input

On Fri, Aug 23, 2013 at 10:54:55AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied, thank you.

> ---
>  drivers/input/joystick/as5011.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c
> index 121cd63..262ebe2 100644
> --- a/drivers/input/joystick/as5011.c
> +++ b/drivers/input/joystick/as5011.c
> @@ -288,6 +288,7 @@ static int as5011_probe(struct i2c_client *client,
>  	if (irq < 0) {
>  		dev_err(&client->dev,
>  			"Failed to get irq number for button gpio\n");
> +		error = irq;
>  		goto err_free_button_gpio;
>  	}
>  
> 

-- 
Dmitry

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

end of thread, other threads:[~2013-08-24 23:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23  2:54 [PATCH] Input: as5011 - fix error return code in as5011_probe() Wei Yongjun
2013-08-24 23:40 ` Dmitry Torokhov

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).