diff options
Diffstat (limited to 'drivers/net/jazzsonic.c')
-rw-r--r-- | drivers/net/jazzsonic.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c index 3e6aaf9e5ce7..949c1f933644 100644 --- a/drivers/net/jazzsonic.c +++ b/drivers/net/jazzsonic.c @@ -82,11 +82,20 @@ static unsigned short known_revisions[] = static int jazzsonic_open(struct net_device* dev) { - if (request_irq(dev->irq, sonic_interrupt, IRQF_DISABLED, "sonic", dev)) { - printk(KERN_ERR "%s: unable to get IRQ %d.\n", dev->name, dev->irq); - return -EAGAIN; + int retval; + + retval = request_irq(dev->irq, sonic_interrupt, IRQF_DISABLED, + "sonic", dev); + if (retval) { + printk(KERN_ERR "%s: unable to get IRQ %d.\n", + dev->name, dev->irq); + return retval; } - return sonic_open(dev); + + retval = sonic_open(dev); + if (retval) + free_irq(dev->irq, dev); + return retval; } static int jazzsonic_close(struct net_device* dev) |