Skip to content

Commit

Permalink
mac8390: propagate error code from request_irq
Browse files Browse the repository at this point in the history
Use the request_irq() error code as the return value for mac8390_open().
EAGAIN doesn't make sense for Nubus slot IRQs. Only this driver can claim
this IRQ (until the NIC is removed, which means everything is powered
down).

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Finn Thain authored and David S. Miller committed Jun 2, 2010
1 parent c1f8fc5 commit 38454db
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/net/mac8390.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,12 +641,13 @@ static int __init mac8390_initdev(struct net_device *dev,

static int mac8390_open(struct net_device *dev)
{
int err;

__ei_open(dev);
if (request_irq(dev->irq, __ei_interrupt, 0, "8390 Ethernet", dev)) {
pr_info("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
return -EAGAIN;
}
return 0;
err = request_irq(dev->irq, __ei_interrupt, 0, "8390 Ethernet", dev);
if (err)
pr_info("%s: unable to get IRQ %d\n", dev->name, dev->irq);
return err;
}

static int mac8390_close(struct net_device *dev)
Expand Down

0 comments on commit 38454db

Please sign in to comment.