Skip to content

Commit

Permalink
sh_eth: unsigned ndev->irq cannot be negative
Browse files Browse the repository at this point in the history
unsigned ndev->irq cannot be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
roel kluin authored and Paul Mundt committed Sep 11, 2008
1 parent b21a910 commit cc3c080
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1205,11 +1205,12 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
devno = 0;

ndev->dma = -1;
ndev->irq = platform_get_irq(pdev, 0);
if (ndev->irq < 0) {
ret = platform_get_irq(pdev, 0);
if (ret < 0) {
ret = -ENODEV;
goto out_release;
}
ndev->irq = ret;

SET_NETDEV_DEV(ndev, &pdev->dev);

Expand Down

0 comments on commit cc3c080

Please sign in to comment.