From: Wei Yongjun Date: Tue, 7 Feb 2017 18:00:37 +0000 (-0800) Subject: Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e78395334ba6034b53e21e09ce8a50c303d130a9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c index 2aa3cd0fe222..746255830b47 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;