From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mark Brown <broonie@kernel.org>,
Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-spi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] spi: omap2-mcspi: Fix probe so driver works again
Date: Wed, 21 Sep 2022 10:24:51 +0300 [thread overview]
Message-ID: <Yyq8Q/kd301wVzg8@kili> (raw)
This condition was accidentally changed from "if (status < 0)" to
"if (status)". The platform_get_irq() function returns non-zero
positive values on success so, unfortunately, the driver could not be
used. Change the condition back to how it was.
Fixes: f4ca8c88c2c7 ("spi: omap2-mcspi: Switch to use dev_err_probe() helper")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Sorry, if you recieve this twice. There is a bug in the msmtp program
so the first email I send every day is lost and I think this was my
first email. Resending.
drivers/spi/spi-omap2-mcspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 80e79f3aa0c4..6ba9b0d7710b 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1509,7 +1509,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
}
status = platform_get_irq(pdev, 0);
- if (status) {
+ if (status < 0) {
dev_err_probe(&pdev->dev, status, "no irq resource found\n");
goto free_master;
}
--
2.35.1
next reply other threads:[~2022-09-21 7:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 7:24 Dan Carpenter [this message]
2022-09-21 7:46 ` [PATCH] spi: omap2-mcspi: Fix probe so driver works again Yang Yingliang
2022-09-21 12:38 ` Mark Brown
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=Yyq8Q/kd301wVzg8@kili \
--to=dan.carpenter@oracle.com \
--cc=broonie@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-spi@vger.kernel.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).