Patchwork vxge: Remember to release firmware after upgrading firmware

login
register
mail settings
Submitter Jesper Juhl
Date Jan. 13, 2011, 8:25 p.m.
Message ID <alpine.LNX.2.00.1101132119080.11347@swampdragon.chaosbits.net>
Download mbox | patch
Permalink /patch/78808/
State Accepted
Delegated to: David Miller
Headers show

Comments

Jesper Juhl - Jan. 13, 2011, 8:25 p.m.
Regardless of whether the firmware update being performed by 
vxge_fw_upgrade() is a success or not we must still remember to always 
release_firmware() before returning.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 vxge-main.c |    1 +
 1 file changed, 1 insertion(+)
Ramkrishna Vepa - Jan. 13, 2011, 8:35 p.m.
> Regardless of whether the firmware update being performed by
> vxge_fw_upgrade() is a success or not we must still remember to always
> release_firmware() before returning.
> 
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> ---
>  vxge-main.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
> index 1ac9b56..c81a651 100644
> --- a/drivers/net/vxge/vxge-main.c
> +++ b/drivers/net/vxge/vxge-main.c
> @@ -4120,6 +4120,7 @@ int vxge_fw_upgrade(struct vxgedev *vdev, char
> *fw_name, int override)
>  	       "hotplug event.\n");
> 
>  out:
> +	release_firmware(fw);
>  	return ret;
>  }
Thanks!

Acked-by: Ram Vepa <ram.vepa@exar.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Jan. 14, 2011, 5:50 a.m.
From: Jesper Juhl <jj@chaosbits.net>
Date: Thu, 13 Jan 2011 21:25:20 +0100 (CET)

> Regardless of whether the firmware update being performed by 
> vxge_fw_upgrade() is a success or not we must still remember to always 
> release_firmware() before returning.
> 
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 1ac9b56..c81a651 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -4120,6 +4120,7 @@  int vxge_fw_upgrade(struct vxgedev *vdev, char *fw_name, int override)
 	       "hotplug event.\n");
 
 out:
+	release_firmware(fw);
 	return ret;
 }