diff mbox series

[-next] Input: pinephone-keyboard - fix error return code in ppkb_probe()

Message ID 20221009025459.38193-1-yangyingliang@huawei.com
State New
Headers show
Series [-next] Input: pinephone-keyboard - fix error return code in ppkb_probe() | expand

Commit Message

Yang Yingliang Oct. 9, 2022, 2:54 a.m. UTC
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 mbox series

Patch

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;