devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] spi/xilinx: signedness issue checking platform_get_irq()
@ 2013-07-17 12:26 Dan Carpenter
  2013-07-17 15:03 ` Stephen Warren
       [not found] ` <20130717122638.GB4851-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Carpenter @ 2013-07-17 12:26 UTC (permalink / raw)
  To: Mark Brown
  Cc: Grant Likely, Rob Herring, linux-spi, devicetree-discuss,
	kernel-janitors

"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;
 	}

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-17 17:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-17 12:26 [patch] spi/xilinx: signedness issue checking platform_get_irq() Dan Carpenter
2013-07-17 15:03 ` 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

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).