linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] Input: pinephone-keyboard - fix error return code in ppkb_probe()
@ 2022-10-09  2:54 Yang Yingliang
  2022-10-10  5:29 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2022-10-09  2:54 UTC (permalink / raw)
  To: linux-input; +Cc: samuel, dmitry.torokhov, yangyingliang

Fix error return code when devm_request_threaded_irq() fails in ppkb_probe().

Fixes: 0f8ef9709408 ("Input: pinephone-keyboard - add PinePhone keyboard driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/input/keyboard/pinephone-keyboard.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/keyboard/pinephone-keyboard.c b/drivers/input/keyboard/pinephone-keyboard.c
index c1b291428f36..06ff614dbb88 100644
--- a/drivers/input/keyboard/pinephone-keyboard.c
+++ b/drivers/input/keyboard/pinephone-keyboard.c
@@ -440,8 +440,8 @@ static int ppkb_probe(struct i2c_client *client)
 	ret = devm_request_threaded_irq(dev, client->irq, NULL, ppkb_irq_thread,
 					IRQF_ONESHOT, client->name, client);
 	if (ret) {
-		dev_err(dev, "Failed to request IRQ: %d\n", error);
-		return error;
+		dev_err(dev, "Failed to request IRQ: %d\n", ret);
+		return ret;
 	}
 
 	return 0;
-- 
2.25.1


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

end of thread, other threads:[~2022-10-10  5:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-09  2:54 [PATCH -next] Input: pinephone-keyboard - fix error return code in ppkb_probe() Yang Yingliang
2022-10-10  5:29 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).