Skip to content

Commit 5caab2d

Browse files
Wei Yongjundtor
authored andcommitted
Input: synaptics-rmi4 - fix error return code in rmi_driver_probe()
Fix to return a negative error code from the input_register_device() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent d5a5e5b commit 5caab2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/input/rmi4/rmi_driver.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,8 @@ static int rmi_driver_probe(struct device *dev)
12101210
if (data->input) {
12111211
rmi_driver_set_input_name(rmi_dev, data->input);
12121212
if (!rmi_dev->xport->input) {
1213-
if (input_register_device(data->input)) {
1213+
retval = input_register_device(data->input);
1214+
if (retval) {
12141215
dev_err(dev, "%s: Failed to register input device.\n",
12151216
__func__);
12161217
goto err_destroy_functions;

0 commit comments

Comments
 (0)