summaryrefslogtreecommitdiffstats
path: root/drivers/input/rmi4
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2020-04-29 01:09:53 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-04-29 01:11:40 +0200
commit5caab2da63207d6d631007f592f5219459e3454d (patch)
tree1981a0bc1662ec7cb519571b777ba20809ad6a01 /drivers/input/rmi4
parentInput: synaptics-rmi4 - really fix attn_data use-after-free (diff)
downloadlinux-5caab2da63207d6d631007f592f5219459e3454d.tar.xz
linux-5caab2da63207d6d631007f592f5219459e3454d.zip
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>
Diffstat (limited to 'drivers/input/rmi4')
-rw-r--r--drivers/input/rmi4/rmi_driver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index c18e1a25bca6..258d5fe3d395 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -1210,7 +1210,8 @@ static int rmi_driver_probe(struct device *dev)
if (data->input) {
rmi_driver_set_input_name(rmi_dev, data->input);
if (!rmi_dev->xport->input) {
- if (input_register_device(data->input)) {
+ retval = input_register_device(data->input);
+ if (retval) {
dev_err(dev, "%s: Failed to register input device.\n",
__func__);
goto err_destroy_functions;