From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mark Brown <broonie@kernel.org>
Cc: Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>,
linux-spi@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
kernel-janitors@vger.kernel.org
Subject: [patch] spi/xilinx: signedness issue checking platform_get_irq()
Date: Wed, 17 Jul 2013 15:26:38 +0300 [thread overview]
Message-ID: <20130717122638.GB4851@elgon.mountain> (raw)
"xspi->irq" is unsigned int so it's never less than zero. I have added
a cast.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index fea815c..e5201fb 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -442,7 +442,7 @@ static int xilinx_spi_probe(struct platform_device *pdev)
xspi_init_hw(xspi);
xspi->irq = platform_get_irq(pdev, 0);
- if (xspi->irq < 0) {
+ if ((int)xspi->irq < 0) {
ret = xspi->irq;
goto put_master;
}
next reply other threads:[~2013-07-17 12:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-17 12:26 Dan Carpenter [this message]
2013-07-17 15:03 ` [patch] spi/xilinx: signedness issue checking platform_get_irq() Stephen Warren
2013-07-17 15:34 ` Dan Carpenter
[not found] ` <20130717122638.GB4851-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2013-07-17 15:05 ` Mark Brown
2013-07-17 15:34 ` [patch v2] " Dan Carpenter
2013-07-17 17:20 ` 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=20130717122638.GB4851@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=broonie@kernel.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=rob.herring@calxeda.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