* [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
* Re: [PATCH -next] Input: pinephone-keyboard - fix error return code in ppkb_probe()
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
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2022-10-10 5:29 UTC (permalink / raw)
To: Yang Yingliang; +Cc: linux-input, samuel
Hi Yang,
On Sun, Oct 09, 2022 at 10:54:59AM +0800, Yang Yingliang wrote:
> Fix error return code when devm_request_threaded_irq() fails in ppkb_probe().
Thank you very much for letting me know of this issue.
>
> 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;
The intent was to use the "error" variable, so instead I changed the
assignment and the test and rolled the fix into the original commit.
Thank you.
--
Dmitry
^ permalink raw reply [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).