drivers/net: Do not free an IRQ if its request failed
authorLee Jones <lee.jones@linaro.org>
Thu, 19 Apr 2012 10:36:33 +0000 (10:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Apr 2012 20:41:11 +0000 (16:41 -0400)
Refrain from attempting to free an interrupt line if the request
fails and hence, there is no IRQ to free.

CC: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/smsc911x.c

index 5aa2dbe2bfb52a255c40bdfb0744e8215d216026..cd3defb11ffb3e09822b5f20555796ddd8960fd2 100644 (file)
@@ -2378,7 +2378,6 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
        SET_NETDEV_DEV(dev, &pdev->dev);
 
        pdata = netdev_priv(dev);
-
        dev->irq = irq_res->start;
        irq_flags = irq_res->flags & IRQF_TRIGGER_MASK;
        pdata->ioaddr = ioremap_nocache(res->start, res_size);
@@ -2442,7 +2441,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
        if (retval) {
                SMSC_WARN(pdata, probe,
                          "Unable to claim requested irq: %d", dev->irq);
-               goto out_free_irq;
+               goto out_disable_resources;
        }
 
        retval = register_netdev(dev);