Commit ab08999d authored by roel kluin's avatar roel kluin Committed by David S. Miller

WARNING: some request_irq() failures ignored in el2_open()

Request_irq() may fail in different ways, handle accordingly.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aa133076
...@@ -383,7 +383,7 @@ out: ...@@ -383,7 +383,7 @@ out:
static int static int
el2_open(struct net_device *dev) el2_open(struct net_device *dev)
{ {
int retval = -EAGAIN; int retval;
if (dev->irq < 2) { if (dev->irq < 2) {
int irqlist[] = {5, 9, 3, 4, 0}; int irqlist[] = {5, 9, 3, 4, 0};
...@@ -391,7 +391,8 @@ el2_open(struct net_device *dev) ...@@ -391,7 +391,8 @@ el2_open(struct net_device *dev)
outb(EGACFR_NORM, E33G_GACFR); /* Enable RAM and interrupts. */ outb(EGACFR_NORM, E33G_GACFR); /* Enable RAM and interrupts. */
do { do {
if (request_irq (*irqp, NULL, 0, "bogus", dev) != -EBUSY) { retval = request_irq(*irqp, NULL, 0, "bogus", dev);
if (retval >= 0) {
/* Twinkle the interrupt, and check if it's seen. */ /* Twinkle the interrupt, and check if it's seen. */
unsigned long cookie = probe_irq_on(); unsigned long cookie = probe_irq_on();
outb_p(0x04 << ((*irqp == 9) ? 2 : *irqp), E33G_IDCFR); outb_p(0x04 << ((*irqp == 9) ? 2 : *irqp), E33G_IDCFR);
...@@ -400,11 +401,14 @@ el2_open(struct net_device *dev) ...@@ -400,11 +401,14 @@ el2_open(struct net_device *dev)
&& ((retval = request_irq(dev->irq = *irqp, && ((retval = request_irq(dev->irq = *irqp,
eip_interrupt, 0, dev->name, dev)) == 0)) eip_interrupt, 0, dev->name, dev)) == 0))
break; break;
} else {
if (retval != -EBUSY)
return reval;
} }
} while (*++irqp); } while (*++irqp);
if (*irqp == 0) { if (*irqp == 0) {
outb(EGACFR_IRQOFF, E33G_GACFR); /* disable interrupts. */ outb(EGACFR_IRQOFF, E33G_GACFR); /* disable interrupts. */
return retval; return -EAGAIN;
} }
} else { } else {
if ((retval = request_irq(dev->irq, eip_interrupt, 0, dev->name, dev))) { if ((retval = request_irq(dev->irq, eip_interrupt, 0, dev->name, dev))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment