Skip to content

Commit

Permalink
xilinx_spi: test below 0 on unsigned irq in xilinx_spi_probe()
Browse files Browse the repository at this point in the history
xilinx_spi->irq is unsigned, so the test fails

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrei Konovalov <akonovalov@ru.mvista.com>
Cc: Yuri Frolov <yfrolov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Roel Kluin authored and Linus Torvalds committed Jul 24, 2008
1 parent a61f534 commit 166a375
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/spi/xilinx_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 166a375

Please sign in to comment.