Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.

Commit

Permalink
Input: sur40 - fix an error code in sur40_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit b0b7d2815839024e5181bd2572f5d8d4f65363b3 ]

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

Fixes: cee1e3e ("media: add video control handlers using V4L2 control framework")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/YBKFkbATXa5fA3xj@mwanda
Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Dan Carpenter authored and gregkh committed Mar 4, 2021
1 parent 98a31a6 commit 644caa3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/touchscreen/sur40.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,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;
}

Expand Down

0 comments on commit 644caa3

Please sign in to comment.