Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts()
@ 2017-02-07 14:52 Wei Yongjun
  2017-02-07 15:00 ` Benjamin Tissoires
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2017-02-07 14:52 UTC (permalink / raw)
  To: Dmitry Torokhov, Masahiro Yamada, Bjorn Andersson,
	Benjamin Tissoires, Andrew Duggan, Nick Dyer, Christophe JAILLET
  Cc: Wei Yongjun, linux-input

From: Wei Yongjun <weiyongjun1@huawei.com>

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>
---
 drivers/input/rmi4/rmi_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index bf5c36e..0c54446 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -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;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-07 18:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-07 14:52 [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts() Wei Yongjun
2017-02-07 15:00 ` Benjamin Tissoires
2017-02-07 18:00   ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox