[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100710112229.GX19184@bicker>
Date: Sat, 10 Jul 2010 13:22:29 +0200
From: Dan Carpenter <error27@...il.com>
To: Kulikov Vasiliy <segooon@...il.com>
Cc: kernel-janitors@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Finn Thain <fthain@...egraphics.com.au>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, Tejun Heo <tj@...nel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
netdev@...r.kernel.org
Subject: Re: [PATCH 2/3] macsonic: free irq if sonic_open() fails
On Sat, Jul 10, 2010 at 03:01:00PM +0400, Kulikov Vasiliy wrote:
> + if (dev->irq == IRQ_AUTO_3) {
> + retval = request_irq(IRQ_NUBUS_9, macsonic_interrupt,
> + IRQ_FLG_FAST, "sonic", dev);
> + if (retval) {
> + printk(KERN_ERR "%s: unable to get IRQ %d.\n",
> + dev->name, IRQ_NUBUS_9);
> + goto err_irq;
> }
> - return sonic_open(dev);
> + }
> + retval = sonic_open(dev);
> + if (retval)
> + goto err_irq_nubus;
> + return 0;
> +
> +err_irq_nubus:
This should be:
+ if (dev->irq == IRQ_AUTO_3)
+ free_irq(IRQ_NUBUS_9, dev);
> +err_irq:
> + free_irq(dev->irq, dev);
> +err:
> + return retval;
> }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists