summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6655
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-23 13:28:05 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-30 15:46:26 +0400
commit3147cf59d144d1d5fa0d7d5574a7d514ae8efe16 (patch)
tree34b3f534c32c41367167d07f44a2bd5d719858bb /drivers/staging/vt6655
parentaba12e3fccc79b8553a28a696e20859e3bfb1519 (diff)
downloadlinux-3147cf59d144d1d5fa0d7d5574a7d514ae8efe16.tar.xz
Staging: vt6655: add missing free_netdev() on error in hostap_enable_hostapd()
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> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r--drivers/staging/vt6655/hostap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
index 46f097d0c841..57a08c5771f2 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;
}