[PATCH 2/2] xilinx_spi: test below 0 on unsigned irq in xilinx_spi_probe()

From: Roel Kluin
Date: Wed Apr 23 2008 - 16:55:50 EST


similarly,
---
xilinx_spi->irq is unsigned, so the test fails

Signed-off-by: Roel Kluin <12o3l@xxxxxxxxxx>
---
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index cf6aef3..613db82 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -353,11 +353,12 @@ static int __init xilinx_spi_probe(struct platform_device *dev)
goto put_master;
}

- xspi->irq = platform_get_irq(dev, 0);
- if (xspi->irq < 0) {
- ret = -ENXIO;
+ ret = platform_get_irq(dev, 0);
+ if (ret < 0)
goto unmap_io;
- }
+
+ xspi->irq = ret;
+ ret = 0;

master->bus_num = pdata->bus_num;
master->num_chipselect = pdata->num_chipselect;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/