From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 2/4] Input: omap4-keypad - Fix handling of platform_get_irq() error
Date: Tue, 15 Sep 2020 23:25:52 -0700 [thread overview]
Message-ID: <CAKdAkRQeh7R-AeiPS3C3JmYaK2MSAvtgg=0YxBj9id1otjAGig@mail.gmail.com> (raw)
In-Reply-To: <CAJKOXPf5kjJitS=7_9wTWMmM4L1TwSnpdhspR9dQXpY2LH1y=g@mail.gmail.com>
On Tue, Sep 15, 2020 at 11:06 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Wed, 16 Sep 2020 at 02:54, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> >
> > On Fri, Aug 28, 2020 at 04:57:42PM +0200, Krzysztof Kozlowski wrote:
> > > platform_get_irq() returns -ERRNO on error. In such case comparison
> > > to 0 would pass the check.
> > >
> > > Fixes: f3a1ba60dbdb ("Input: omap4-keypad - use platform device helpers")
> > > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > >
> > > ---
> > >
> > > Changes since v1:
> > > 1. None
> > > ---
> > > drivers/input/keyboard/omap4-keypad.c | 6 ++----
> > > 1 file changed, 2 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
> > > index 94c94d7f5155..b075f1af0305 100644
> > > --- a/drivers/input/keyboard/omap4-keypad.c
> > > +++ b/drivers/input/keyboard/omap4-keypad.c
> > > @@ -240,10 +240,8 @@ static int omap4_keypad_probe(struct platform_device *pdev)
> > > }
> > >
> > > irq = platform_get_irq(pdev, 0);
> > > - if (!irq) {
> > > - dev_err(&pdev->dev, "no keyboard irq assigned\n");
> > > - return -EINVAL;
> > > - }
> > > + if (irq < 0)
> > > + return -irq;
> >
> > You must have meant just "irq", right?
>
> Damn it, of course. I'll send a v2 for this.
It's fine, I can fix it up locally.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2020-09-16 6:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-28 14:57 [PATCH v2 1/4] Input: ep93xx_keypad - Fix handling of platform_get_irq() error Krzysztof Kozlowski
2020-08-28 14:57 ` [PATCH v2 2/4] Input: omap4-keypad " Krzysztof Kozlowski
2020-09-16 0:53 ` Dmitry Torokhov
2020-09-16 6:06 ` Krzysztof Kozlowski
2020-09-16 6:25 ` Dmitry Torokhov [this message]
2020-08-28 14:57 ` [PATCH v2 3/4] Input: twl4030_keypad " Krzysztof Kozlowski
2020-08-28 14:57 ` [PATCH v2 4/4] Input: sun4i-ps2 " Krzysztof Kozlowski
2020-08-28 15:34 ` Chen-Yu Tsai
2020-09-16 1:01 ` Dmitry Torokhov
2020-09-16 6:08 ` Krzysztof Kozlowski
2020-09-11 15:31 ` [PATCH v2 1/4] Input: ep93xx_keypad " Krzysztof Kozlowski
2020-09-14 6:51 ` Dmitry Torokhov
2020-09-15 16:05 ` Krzysztof Kozlowski
2020-09-16 0:55 ` Dmitry Torokhov
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='CAKdAkRQeh7R-AeiPS3C3JmYaK2MSAvtgg=0YxBj9id1otjAGig@mail.gmail.com' \
--to=dmitry.torokhov@gmail.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=wens@csie.org \
/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).