Patchwork [v2] powerpc/fs_enet: Add missing irq free in error path.

login
register
mail settings
Submitter Mike Ditto
Date Oct. 27, 2008, 9:46 p.m.
Message ID <490636B4.2010202@consentry.com>
Download mbox | patch
Permalink /patch/5976/
State Accepted, archived
Delegated to: Kumar Gala
Headers show

Comments

Mike Ditto - Oct. 27, 2008, 9:46 p.m.
If something goes wrong attaching to phy driver, we weren't freeing
the IRQ.

Signed-off-by: Mike Ditto <mditto@consentry.com>
---
Reposting to CC netdev list.  (Thanks, Kumar)
Kumar Gala - Jan. 13, 2009, 4:28 p.m.
On Oct 27, 2008, at 4:46 PM, Mike Ditto wrote:

> If something goes wrong attaching to phy driver, we weren't freeing
> the IRQ.
>
> Signed-off-by: Mike Ditto <mditto@consentry.com>
> ---
> Reposting to CC netdev list.  (Thanks, Kumar)
>
> diff -r -upN 2.6.28-rc1/drivers/net/fs_enet/fs_enet-main.c NEW/ 
> drivers/net/fs_enet/fs_enet-main.c
> --- 2.6.28-rc1/drivers/net/fs_enet/fs_enet-main.c	2008-10-24  
> 17:54:31.000000000 -0700
> +++ NEW/drivers/net/fs_enet/fs_enet-main.c	2008-10-24  
> 17:57:03.000000000 -0700
> @@ -795,6 +795,7 @@ static int fs_enet_open(struct net_devic
>
> 	err = fs_init_phy(dev);
> 	if (err) {
> +		free_irq(fep->interrupt, dev);
> 		if (fep->fpi->use_napi)
> 			napi_disable(&fep->napi);
> 		return err;
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

Dave,

This seems to have gotten lost in the shuffle.  Can you please apply.

- k
David Miller - Jan. 15, 2009, 4:44 a.m.
From: Kumar Gala <galak@kernel.crashing.org>
Date: Tue, 13 Jan 2009 10:28:15 -0600

> 
> On Oct 27, 2008, at 4:46 PM, Mike Ditto wrote:
> 
> > If something goes wrong attaching to phy driver, we weren't freeing
> > the IRQ.
> >
> > Signed-off-by: Mike Ditto <mditto@consentry.com>
 ...
> This seems to have gotten lost in the shuffle.  Can you please apply.

The netdev patchwork never saw it for some reason.

Applied, thanks.

Patch

diff -r -upN 2.6.28-rc1/drivers/net/fs_enet/fs_enet-main.c NEW/drivers/net/fs_enet/fs_enet-main.c
--- 2.6.28-rc1/drivers/net/fs_enet/fs_enet-main.c	2008-10-24 17:54:31.000000000 -0700
+++ NEW/drivers/net/fs_enet/fs_enet-main.c	2008-10-24 17:57:03.000000000 -0700
@@ -795,6 +795,7 @@  static int fs_enet_open(struct net_devic

 	err = fs_init_phy(dev);
 	if (err) {
+		free_irq(fep->interrupt, dev);
 		if (fep->fpi->use_napi)
 			napi_disable(&fep->napi);
 		return err;