Skip to content

Commit

Permalink
ARM: am79c961a: platform_get_irq() may return signed unnoticed
Browse files Browse the repository at this point in the history
dev->irq is unsigned, platform_get_irq() may return signed unnoticed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Roel Kluin authored and Jeff Garzik committed Apr 29, 2008
1 parent 0a0a831 commit 770f867
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/net/arm/am79c961a.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 770f867

Please sign in to comment.