diff options
| author | Roel Kluin <[email protected]> | 2008-07-23 21:29:53 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2008-07-24 10:47:30 -0700 |
| commit | 166a375b657b7af494f4ce3f72c4d2002180da44 (patch) | |
| tree | 02a3c51a478535b582b4d38833755fc3cfa82d3e | |
| parent | a61f5345eba34772a71523227de890a28410f320 (diff) | |
xilinx_spi: test below 0 on unsigned irq in xilinx_spi_probe()
xilinx_spi->irq is unsigned, so the test fails
Signed-off-by: Roel Kluin <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Andrei Konovalov <[email protected]>
Cc: Yuri Frolov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| -rw-r--r-- | drivers/spi/xilinx_spi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c index 113a0468ffcb..68d6f4988fb5 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 = platform_get_irq(dev, 0); + if (ret < 0) { ret = -ENXIO; goto unmap_io; } + xspi->irq = ret; master->bus_num = pdata->bus_num; master->num_chipselect = pdata->num_chipselect; |