From: Dan Carpenter <dan.carpenter@oracle.com>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH] peci: Fix platform_get_irq() error checking
Date: Thu, 11 Aug 2022 13:49:26 +0300 [thread overview]
Message-ID: <YvTettdmRKZw46mb@kili> (raw)
The platform_get_irq() function returns success or negative error codes
on failure.
Fixes: a85e4c52086c ("peci: Add peci-aspeed controller driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/peci/controller/peci-aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/peci/controller/peci-aspeed.c b/drivers/peci/controller/peci-aspeed.c
index 1925ddc13f00..731c5d8f75c6 100644
--- a/drivers/peci/controller/peci-aspeed.c
+++ b/drivers/peci/controller/peci-aspeed.c
@@ -523,7 +523,7 @@ static int aspeed_peci_probe(struct platform_device *pdev)
return PTR_ERR(priv->base);
priv->irq = platform_get_irq(pdev, 0);
- if (!priv->irq)
+ if (priv->irq < 0)
return priv->irq;
ret = devm_request_irq(&pdev->dev, priv->irq, aspeed_peci_irq_handler,
--
2.35.1
next reply other threads:[~2022-08-11 10:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 10:49 Dan Carpenter [this message]
2022-08-15 19:19 ` [PATCH] peci: Fix platform_get_irq() error checking Winiarska, Iwona
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=YvTettdmRKZw46mb@kili \
--to=dan.carpenter@oracle.com \
--cc=linux-aspeed@lists.ozlabs.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