Commit e7839533 authored by Wei Yongjun's avatar Wei Yongjun Committed by Dmitry Torokhov

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: 6bd0dcfa ("Input: synaptics-rmi4 - factor out functions
from probe")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent a1fbf5bb
...@@ -1062,7 +1062,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) ...@@ -1062,7 +1062,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data)
data->irq_memory = devm_kzalloc(dev, size * 4, GFP_KERNEL); data->irq_memory = devm_kzalloc(dev, size * 4, GFP_KERNEL);
if (!data->irq_memory) { if (!data->irq_memory) {
dev_err(dev, "Failed to allocate memory for irq masks.\n"); dev_err(dev, "Failed to allocate memory for irq masks.\n");
return retval; return -ENOMEM;
} }
data->irq_status = data->irq_memory + size * 0; data->irq_status = data->irq_memory + size * 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment