summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-02-07 10:00:37 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-02-07 14:23:43 -0800
commite78395334ba6034b53e21e09ce8a50c303d130a9 (patch)
tree8983da37b39ff224aacff78196ac13cb43055f92
parenta1fbf5bbef025b4844162b3b8868888003a7ee9c (diff)
downloadop-kernel-dev-e78395334ba6034b53e21e09ce8a50c303d130a9.zip
op-kernel-dev-e78395334ba6034b53e21e09ce8a50c303d130a9.tar.gz
Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts()
Fix to return error code -ENOMEM from the devm_kzalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functions from probe") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/rmi4/rmi_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index 2aa3cd0..7462558 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -1062,7 +1062,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data)
data->irq_memory = devm_kzalloc(dev, size * 4, GFP_KERNEL);
if (!data->irq_memory) {
dev_err(dev, "Failed to allocate memory for irq masks.\n");
- return retval;
+ return -ENOMEM;
}
data->irq_status = data->irq_memory + size * 0;
OpenPOWER on IntegriCloud