提交 166a375b 编写于 作者: R Roel Kluin 提交者: Linus Torvalds

xilinx_spi: test below 0 on unsigned irq in xilinx_spi_probe()

xilinx_spi->irq is unsigned, so the test fails
Signed-off-by: NRoel 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a61f5345
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册