提交 770f8679 编写于 作者: R Roel Kluin 提交者: Jeff Garzik

ARM: am79c961a: platform_get_irq() may return signed unnoticed

dev->irq is unsigned, platform_get_irq() may return signed unnoticed
Signed-off-by: NRoel Kluin <12o3l@tiscali.nl>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 0a0a8310
......@@ -693,11 +693,15 @@ static int __init am79c961_probe(struct platform_device *pdev)
* done by the ether bootp loader.
*/
dev->base_addr = res->start;
dev->irq = platform_get_irq(pdev, 0);
ret = platform_get_irq(pdev, 0);
ret = -ENODEV;
if (dev->irq < 0)
if (ret < 0) {
ret = -ENODEV;
goto nodev;
}
dev->irq = ret;
ret = -ENODEV;
if (!request_region(dev->base_addr, 0x18, dev->name))
goto nodev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册