linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-input@vger.kernel.org, samuel@sholland.org
Subject: Re: [PATCH -next] Input: pinephone-keyboard - fix error return code in ppkb_probe()
Date: Sun, 9 Oct 2022 22:29:15 -0700	[thread overview]
Message-ID: <Y0Otqy4LuTcAPqQQ@google.com> (raw)
In-Reply-To: <20221009025459.38193-1-yangyingliang@huawei.com>

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

      reply	other threads:[~2022-10-10  5:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y0Otqy4LuTcAPqQQ@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=samuel@sholland.org \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).