summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2020-04-28 16:09:53 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-03 08:19:33 +0200
commit98d7ca2a1e5967ad659371db163ba2756b024763 (patch)
treec0e8f4f5bd42d7ad119ce136e260b10ed9d3016e /drivers/input
parent54969e54d4b41b4cef73fb7f8d45a2f05380d9f0 (diff)
Input: synaptics-rmi4 - fix error return code in rmi_driver_probe()
[ Upstream commit 5caab2da63207d6d631007f592f5219459e3454d ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/input')
-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 24a1ff34964c..ac6a20f7afdf 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -1213,7 +1213,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;