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 <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20200428134948.78343-1-weiyongjun1@huawei.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent d5a5e5b commit 5caab2d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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