Message ID | 20221009025459.38193-1-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [-next] Input: pinephone-keyboard - fix error return code in ppkb_probe() | expand |
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.
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;
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(-)