提交 cc3c080d 编写于 作者: R roel kluin 提交者: Paul Mundt

sh_eth: unsigned ndev->irq cannot be negative

unsigned ndev->irq cannot be negative
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 b21a9104
...@@ -1205,11 +1205,12 @@ static int sh_eth_drv_probe(struct platform_device *pdev) ...@@ -1205,11 +1205,12 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
devno = 0; devno = 0;
ndev->dma = -1; ndev->dma = -1;
ndev->irq = platform_get_irq(pdev, 0); ret = platform_get_irq(pdev, 0);
if (ndev->irq < 0) { if (ret < 0) {
ret = -ENODEV; ret = -ENODEV;
goto out_release; goto out_release;
} }
ndev->irq = ret;
SET_NETDEV_DEV(ndev, &pdev->dev); SET_NETDEV_DEV(ndev, &pdev->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册