[PATCH] Input: as5011 - fix error return code in as5011_probe()

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE4761d

2 messages, 2 authors, 2013-08-24 · open the first message on its own page

[PATCH] Input: as5011 - fix error return code in as5011_probe()

From: Wei Yongjun <hidden>
Date: 2013-08-23 02:54:56

From: Wei Yongjun <redacted>

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 <redacted>
---
 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;
 	}
 

Re: [PATCH] Input: as5011 - fix error return code in as5011_probe()

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2013-08-24 23:40:11

On Fri, Aug 23, 2013 at 10:54:55AM +0800, Wei Yongjun wrote:
From: Wei Yongjun <redacted>

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 <redacted>
Applied, thank you.
quoted hunk
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help