Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts()
Subsystems (2)
PATCH 1/1 Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts()
From: Wei Yongjun <[email protected]>
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 <[email protected]>
--- drivers/input/rmi4/rmi_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/rmi4/rmi_driver.c +1 -1
@@ -1049,7 +1049,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 ;
Quoted 9 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Fix to return error code
-ENOMEMfrom thedevm_kzalloc()error handling case instead of 0, as done elsewhere in this function.Fixes 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functionsfrom probe")
Signed-off-by Wei Yongjun <[email protected]>---
Good catch.
Reviewed-by Benjamin Tissoires <[email protected]>
Quoted 17 lines
drivers/input/rmi4/rmi_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/input/rmi4/rmi_driver.c +1
-1@@ -1049,7 +1049,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 ;
Quoted 6 lines · Benjamin Tissoires
Quoted 5 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Fix to return error code
-ENOMEMfrom thedevm_kzalloc()error handling case instead of 0, as done elsewhere in this function.
Quoted 8 lines
Quoted 4 lines
Fixes 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functionsfrom probe")
Signed-off-by Wei Yongjun <[email protected]>---
Good catch.
Reviewed-by Benjamin Tissoires <[email protected]>
Applied, thank you.
Quoted 18 lines
Quoted 18 lines
drivers/input/rmi4/rmi_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/input/rmi4/rmi_driver.c +1
-1@@ -1049,7 +1049,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 ;
Signature · 1 line
Dmitry