[patch] spi/xilinx: signedness issue checking platform_get_irq()
Dan Carpenter
dan.carpenter at oracle.com
Wed Jul 17 22:26:38 EST 2013
"xspi->irq" is unsigned int so it's never less than zero. I have added
a cast.
Signed-off-by: Dan Carpenter <dan.carpenter at 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;
}
More information about the devicetree-discuss
mailing list