Skip to contentSkip to conversation

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

PATCH Applied Dan Carpenter 2 participants 2 messages Jan 28, 2021 – Feb 17, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: sur40 - Fix an error code in sur40_probe()

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")
---
 drivers/input/touchscreen/sur40.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/touchscreen/sur40.c +1 -0
index 620cdd7d214a..12f2562b0141 100644
@@ -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;
 	}
 
Signature · 1 line
2.29.2
maintainer Applied
#1 lore raw
Quoted 5 lines · Dan Carpenter

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

Applied, thank you.

Signature · 1 line
Dmitry