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: cee1e3e2ef
("media: add video control handlers using V4L2 control framework")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YBKFkbATXa5fA3xj@mwanda
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Родитель
ede6747c2f
Коммит
b0b7d28158
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче