aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xtsonic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/xtsonic.c')
-rw-r--r--drivers/net/xtsonic.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/xtsonic.c b/drivers/net/xtsonic.c
index fdba9cb3a599..9f12026d98e7 100644
--- a/drivers/net/xtsonic.c
+++ b/drivers/net/xtsonic.c
@@ -93,12 +93,20 @@ static unsigned short known_revisions[] =
93 93
94static int xtsonic_open(struct net_device *dev) 94static int xtsonic_open(struct net_device *dev)
95{ 95{
96 if (request_irq(dev->irq,sonic_interrupt,IRQF_DISABLED,"sonic",dev)) { 96 int retval;
97
98 retval = request_irq(dev->irq, sonic_interrupt, IRQF_DISABLED,
99 "sonic", dev);
100 if (retval) {
97 printk(KERN_ERR "%s: unable to get IRQ %d.\n", 101 printk(KERN_ERR "%s: unable to get IRQ %d.\n",
98 dev->name, dev->irq); 102 dev->name, dev->irq);
99 return -EAGAIN; 103 return -EAGAIN;
100 } 104 }
101 return sonic_open(dev); 105
106 retval = sonic_open(dev);
107 if (retval)
108 free_irq(dev->irq, dev);
109 return retval;
102} 110}
103 111
104static int xtsonic_close(struct net_device *dev) 112static int xtsonic_close(struct net_device *dev)