From: Finn Thain Date: Tue, 1 Jun 2010 02:18:32 +0000 (+0000) Subject: mac8390: propagate error code from request_irq X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=38454db3f0b694df929073a5a867edf30551d950;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git mac8390: propagate error code from request_irq 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c index 1136c9a22b67..6b14cfef46c2 100644 --- a/drivers/net/mac8390.c +++ b/drivers/net/mac8390.c @@ -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)