]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
xilinx_spi: test below 0 on unsigned irq in xilinx_spi_probe()
authorRoel Kluin <12o3l@tiscali.nl>
Thu, 24 Jul 2008 04:29:53 +0000 (21:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:30 +0000 (10:47 -0700)
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>
drivers/spi/xilinx_spi.c

index 113a0468ffcbd3291402c136322596ac75ab28e2..68d6f4988fb52a7aca99f5315697d6cb4ca6cf91 100644 (file)
@@ -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;