Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3147cf59 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aba12e3f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
	}