[PATCH] Input: sur40 - Fix an error code in sur40_probe()

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

STALE2000d LANDED

Landed in mainline as b0b7d2815839 on 2021-02-17.

2 messages, 2 authors, 2021-02-17 · open the first message on its own page

[PATCH] Input: sur40 - Fix an error code in sur40_probe()

From: Dan Carpenter <hidden>
Date: 2021-01-28 09:40:44

If v4l2_ctrl_handler_setup() fails then probe() should return an error
code instead of returning success.

Fixes: cee1e3e2ef39 ("media: add video control handlers using V4L2 control framework")
Signed-off-by: Dan Carpenter <redacted>
---
 drivers/input/touchscreen/sur40.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c
index 620cdd7d214a..12f2562b0141 100644
--- a/drivers/input/touchscreen/sur40.c
+++ b/drivers/input/touchscreen/sur40.c
@@ -787,6 +787,7 @@ static int sur40_probe(struct usb_interface *interface,
 		dev_err(&interface->dev,
 			"Unable to register video controls.");
 		v4l2_ctrl_handler_free(&sur40->hdl);
+		error = sur40->hdl.error;
 		goto err_unreg_v4l2;
 	}
 
-- 
2.29.2

Re: [PATCH] Input: sur40 - Fix an error code in sur40_probe()

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2021-02-17 04:38:48

On Thu, Jan 28, 2021 at 12:36:17PM +0300, Dan Carpenter wrote:
If v4l2_ctrl_handler_setup() fails then probe() should return an error
code instead of returning success.

Fixes: cee1e3e2ef39 ("media: add video control handlers using V4L2 control framework")
Signed-off-by: Dan Carpenter <redacted>
Applied, thank you.

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