* [PATCH] Input: sur40 - Fix an error code in sur40_probe()
@ 2021-01-28 9:36 Dan Carpenter
2021-02-17 4:37 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-01-28 9:36 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Nick Desaulniers, Kees Cook, Hans Verkuil, Mauro Carvalho Chehab,
Florian Echtler, linux-input, kernel-janitors
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 <dan.carpenter@oracle.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: sur40 - Fix an error code in sur40_probe()
2021-01-28 9:36 [PATCH] Input: sur40 - Fix an error code in sur40_probe() Dan Carpenter
@ 2021-02-17 4:37 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2021-02-17 4:37 UTC (permalink / raw)
To: Dan Carpenter
Cc: Nick Desaulniers, Kees Cook, Hans Verkuil, Mauro Carvalho Chehab,
Florian Echtler, linux-input, kernel-janitors
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 <dan.carpenter@oracle.com>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-17 4:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 9:36 [PATCH] Input: sur40 - Fix an error code in sur40_probe() Dan Carpenter
2021-02-17 4:37 ` 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).