Skip to contentSkip to conversation

sh_eth: unsigned ndev->irq cannot be negative

PATCH Applied roel kluin 2 participants 2 messages Sep 10, 2008 – Sep 11, 2008

Subsystems (2)
lore
Share & tools
lore

roel kluin

author
#0 lore raw

PATCH 1/1 sh_eth: unsigned ndev->irq cannot be negative

unsigned ndev->irq cannot be negative

---

drivers/net/sh_eth.c +3 -2
index 6a06b95..c52cc82 100644
@@ -1182,11 +1182,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);