* [PATCH -next] Staging: vt6655: add missing free_netdev() on error in hostap_enable_hostapd()
@ 2013-05-23 9:28 Wei Yongjun
2013-05-23 14:21 ` Peter P Waskiewicz Jr
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-05-23 9:28 UTC (permalink / raw)
To: forest, gregkh, joe, hemaklnce, marcos.souza.org,
peter.p.waskiewicz.jr
Cc: yongjun_wei, devel, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Add the missing free_netdev() before return from function
hostap_enable_hostapd() in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/staging/vt6655/hostap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
index 46f097d..57a08c5 100644
--- a/drivers/staging/vt6655/hostap.c
+++ b/drivers/staging/vt6655/hostap.c
@@ -104,6 +104,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
if (ret) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: register_netdevice(AP) failed!\n",
dev->name);
+ free_netdev(pDevice->apdev);
+ pDevice->apdev = NULL;
return -1;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] Staging: vt6655: add missing free_netdev() on error in hostap_enable_hostapd()
2013-05-23 9:28 [PATCH -next] Staging: vt6655: add missing free_netdev() on error in hostap_enable_hostapd() Wei Yongjun
@ 2013-05-23 14:21 ` Peter P Waskiewicz Jr
0 siblings, 0 replies; 2+ messages in thread
From: Peter P Waskiewicz Jr @ 2013-05-23 14:21 UTC (permalink / raw)
To: Wei Yongjun
Cc: forest, gregkh, joe, hemaklnce, marcos.souza.org, yongjun_wei,
devel, linux-kernel
On 05/23/2013 02:28 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing free_netdev() before return from function
> hostap_enable_hostapd() in the error handling case.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/staging/vt6655/hostap.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
> index 46f097d..57a08c5 100644
> --- a/drivers/staging/vt6655/hostap.c
> +++ b/drivers/staging/vt6655/hostap.c
> @@ -104,6 +104,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
> if (ret) {
> DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: register_netdevice(AP) failed!\n",
> dev->name);
> + free_netdev(pDevice->apdev);
> + pDevice->apdev = NULL;
> return -1;
> }
>
>
This looks good to me.
-PJ
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-23 14:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23 9:28 [PATCH -next] Staging: vt6655: add missing free_netdev() on error in hostap_enable_hostapd() Wei Yongjun
2013-05-23 14:21 ` Peter P Waskiewicz Jr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox