From: Stefan Schaeckeler <schaecsn@gmx.net>
To: Krzysztof Kozlowski <krzk@kernel.org>,
Borislav Petkov <bp@alien8.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Tony Luck <tony.luck@intel.com>,
James Morse <james.morse@arm.com>,
Robert Richter <rric@kernel.org>, Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@aj.id.au>, Tero Kristo <t-kristo@ti.com>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Stefan Schaeckeler <sschaeck@cisco.com>
Subject: Re: [PATCH 1/2] EDAC/aspeed: Fix handling of platform_get_irq() error
Date: Thu, 27 Aug 2020 16:49:36 -0700 (PDT) [thread overview]
Message-ID: <20200827234936.BC4D489976B@corona.crabdance.com> (raw)
In-Reply-To: <20200827070743.26628-1-krzk@kernel.org>
> platform_get_irq() returns -ERRNO on error. In such case comparison
> to 0 would pass the check.
>
> Fixes: 9b7e6242ee4e ("EDAC, aspeed: Add an Aspeed AST2500 EDAC driver")
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Stefan Schaeckeler <schaecsn@gmx.net>
> ---
> drivers/edac/aspeed_edac.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
> index b194658b8b5c..fbec28dc661d 100644
> --- a/drivers/edac/aspeed_edac.c
> +++ b/drivers/edac/aspeed_edac.c
> @@ -209,8 +209,8 @@ static int config_irq(void *ctx, struct platform_device *pdev)
> /* register interrupt handler */
> irq = platform_get_irq(pdev, 0);
> dev_dbg(&pdev->dev, "got irq %d\n", irq);
> - if (!irq)
> - return -ENODEV;
> + if (irq < 0)
> + return irq;
>
> rc = devm_request_irq(&pdev->dev, irq, mcr_isr, IRQF_TRIGGER_HIGH,
> DRV_NAME, ctx);
> --
> 2.17.1
>
>
next prev parent reply other threads:[~2020-08-27 23:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 7:07 [PATCH 1/2] EDAC/aspeed: Fix handling of platform_get_irq() error Krzysztof Kozlowski
2020-08-27 7:07 ` [PATCH 2/2] EDAC/ti: " Krzysztof Kozlowski
2020-08-27 7:13 ` Tero Kristo
[not found] ` <0D9EC2D2-C4A0-42E9-94A5-DCFBE7BFEC43@cisco.com>
2020-08-27 23:49 ` Stefan Schaeckeler [this message]
2020-09-01 18:51 ` [PATCH 1/2] EDAC/aspeed: " Borislav Petkov
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=20200827234936.BC4D489976B@corona.crabdance.com \
--to=schaecsn@gmx.net \
--cc=andrew@aj.id.au \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=joel@jms.id.au \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rric@kernel.org \
--cc=sschaeck@cisco.com \
--cc=t-kristo@ti.com \
--cc=tony.luck@intel.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).