From: Igor Kononenko <i.kononenko@yadro.com>
To: Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>
Cc: <openbmc@lists.ozlabs.org>,
Igor Kononenko <i.kononenko@yadro.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-aspeed@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/3] drivers/misc: (aspeed-lpc-snoop): Fix platform_get_irq() error checking
Date: Sun, 21 Aug 2022 18:54:11 +0300 [thread overview]
Message-ID: <77b3bcb747675a7128b98efad3beb0c53e0a8908.1661094034.git.i.kononenko@yadro.com> (raw)
In-Reply-To: <cover.1661094034.git.i.kononenko@yadro.com>
The `platform_get_irq` return negative code that is indicate an error.
So `!lpc_snoop->irq` leads to misscought a failure.
This patch brings fix of checking negative `rc`.
Signed-off-by: Igor Kononenko <i.kononenko@yadro.com>
---
drivers/soc/aspeed/aspeed-lpc-snoop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/aspeed/aspeed-lpc-snoop.c b/drivers/soc/aspeed/aspeed-lpc-snoop.c
index 6ec47bf1dc6b..25731cf0342d 100644
--- a/drivers/soc/aspeed/aspeed-lpc-snoop.c
+++ b/drivers/soc/aspeed/aspeed-lpc-snoop.c
@@ -167,7 +167,7 @@ static int aspeed_lpc_snoop_config_irq(struct aspeed_lpc_snoop *lpc_snoop,
int rc;
lpc_snoop->irq = platform_get_irq(pdev, 0);
- if (!lpc_snoop->irq)
+ if (lpc_snoop->irq < 0)
return -ENODEV;
rc = devm_request_irq(dev, lpc_snoop->irq,
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-08-21 15:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-21 16:06 [PATCH 0/3] aspeed:lpc: Fix lpc-snoop probe exception Igor Kononenko
2022-08-21 15:54 ` [PATCH 1/3] ipmi:kcs_bmc: Add cleanup regmap(interrupt-regs) on a shutdown Igor Kononenko
2022-08-21 19:46 ` kernel test robot
2022-08-22 6:35 ` [PATCH v2 " Igor Kononenko
2022-08-23 0:22 ` Joel Stanley
2022-08-23 6:54 ` i.kononenko
2022-08-21 15:54 ` [PATCH 2/3] drivers/misc: (aspeed-lpc-snoop): Add regmap cleanup " Igor Kononenko
2022-08-23 0:30 ` Joel Stanley
2022-08-23 7:02 ` i.kononenko
2022-08-21 15:54 ` Igor Kononenko [this message]
2022-08-23 0:22 ` [PATCH 0/3] aspeed:lpc: Fix lpc-snoop probe exception Joel Stanley
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=77b3bcb747675a7128b98efad3beb0c53e0a8908.1661094034.git.i.kononenko@yadro.com \
--to=i.kononenko@yadro.com \
--cc=andrew@aj.id.au \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openbmc@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;
as well as URLs for NNTP newsgroup(s).