Input: synaptics-rmi4 - fix the error return code in rmi_probe_interrupts()
Subsystems (3)
Lyude Paul
Reviewed-byQuoted 29 lines · Wei Yongjun
The error return code
PTR_ERR(data->irqdomain)is always 0 sincedata->irqdomainis equal to NULL in this error handling case.Fixes 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to
irq_domain")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
-2@@ -1043,7 +1043,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) data);if (!data->irqdomain) {dev_err (&rmi_dev->dev,"Failed to create IRQ domain\n" ); -return PTR_ERR (data->irqdomain); +return -ENOMEM ; } data->irq_count = irq_count; --To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Cheers, Lyude Paul
Quoted 28 lines · Lyude Paul
Reviewed-by Lyude Paul <[email protected]>Quoted 25 lines · Wei Yongjun
The error return code
PTR_ERR(data->irqdomain)is always 0 sincedata->irqdomainis equal to NULL in this error handling case.Fixes 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to
irq_domain")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@@ -1043,7 +1043,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) data);if (!data->irqdomain) {dev_err (&rmi_dev->dev,"Failed to create IRQ domain\n" ); -return PTR_ERR (data->irqdomain); +return -ENOMEM ; } data->irq_count = irq_count;
Quoted 7 lines
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
Cheers,
Lyude Paul
Nick Desaulniers
Reviewed-byQuoted 37 lines · Nick Desaulniers
Quoted 28 lines · Lyude Paul
Reviewed-by Lyude Paul <[email protected]>Quoted 25 lines · Wei Yongjun
The error return code
PTR_ERR(data->irqdomain)is always 0 sincedata->irqdomainis equal to NULL in this error handling case.Fixes 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to
irq_domain")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@@ -1043,7 +1043,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) data);if (!data->irqdomain) {dev_err (&rmi_dev->dev,"Failed to create IRQ domain\n" ); -return PTR_ERR (data->irqdomain); +return -ENOMEM ; } data->irq_count = irq_count;Quoted 7 lines
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
Cheers,
Lyude Paul
Quoted 1 line
Signed-off-by Nick Desaulniers <[email protected]>
Sorry, that probably should have been a
hopefully that doesn't mess up any maintainers' automated scripts.
Quoted 39 lines · Nick Desaulniers
Quoted 37 lines · Nick Desaulniers
Quoted 35 lines · Lyude Paul
Reviewed-by Lyude Paul <[email protected]>Quoted 26 lines · Wei Yongjun
The error return code
PTR_ERR(data->irqdomain)is always 0 sincedata->irqdomainis equal to NULL in this error handling case.Fixes 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to
irq_domain")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
-2@@ -1043,7 +1043,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data) data);if (!data->irqdomain) {dev_err (&rmi_dev->dev,"Failed to create IRQ domain\n" ); -return PTR_ERR (data->irqdomain); +return -ENOMEM ; } data->irq_count = irq_count; --Quoted 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
Cheers,
Lyude Paul
Quoted 7 lines
Quoted 1 line
Signed-off-by Nick Desaulniers <[email protected]>Sorry, that probably should have been a
Reviewed-by Nick Desaulniers <[email protected]>hopefully that doesn't mess up any maintainers' automated scripts.
Applied, thank you.
Signature · 1 line
Dmitry
PATCH 1/1 Input: synaptics-rmi4 - fix error return code in rmi_driver_probe()
In reply to Lyude PaulFix to return a negative error code from the input_register_device() error handling case instead of 0, as done elsewhere in this function.
--- drivers/input/rmi4/rmi_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/rmi4/rmi_driver.c +2 -1
@@ -1210,7 +1210,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;
Re: [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_driver_probe()
Quoted 4 lines · Wei Yongjun
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 <[email protected]>
Applied, thank you.
Quoted 21 lines
--- drivers/input/rmi4/rmi_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/input/rmi4/rmi_driver.c +2
-1@@ -1210,7 +1210,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;
Signature · 1 line
Dmitry