From: Roel Kluin <12o3l@tiscali.nl> Date: Thu, 24 Jul 2008 04:29:53 +0000 (-0700) Subject: xilinx_spi: test below 0 on unsigned irq in xilinx_spi_probe() X-Git-Tag: v2.6.27-rc1~659 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=166a375b657b7af494f4ce3f72c4d2002180da44;p=linux-2.6-omap-h63xx.git 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 <12o3l@tiscali.nl> Cc: David Brownell Cc: Andrei Konovalov Cc: Yuri Frolov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c index 113a0468ffc..68d6f4988fb 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;