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

login
register
mail settings
Submitter Mike Ditto
Date Oct. 25, 2008, 1:03 a.m.
Message ID <49027044.90509@consentry.com>
Download mbox | patch
Permalink /patch/5752/
State Superseded
Headers show

Comments

Mike Ditto - Oct. 25, 2008, 1:03 a.m.
If something goes wrong attaching to phy driver, we weren't freeing the IRQ.

Signed-off-by: Mike Ditto <mditto@consentry.com>
---
I just noticed this file has already been touched in -rc1 so here is the
patch again, adjusted accordingly.
Kumar Gala - Oct. 27, 2008, 1:45 p.m.
On Oct 24, 2008, at 8:03 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>
> ---
> I just noticed this file has already been touched in -rc1 so here is  
> the
> patch again, adjusted accordingly.
>
> 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;

Please copy Jeff Garizk and the netdev list as such patches normally  
go though that path.

- k

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;