]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
mwifiex: failure path handling in mwifiex_add_virtual_intf()
authorAmitkumar Karwar <akarwar@marvell.com>
Fri, 15 Nov 2013 03:10:38 +0000 (19:10 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 15 Nov 2013 19:29:31 +0000 (14:29 -0500)
commitbec568ff51078276109e21b5521829e2dd60a7fa
tree146e3c17d648eb70d375bff711903c1e6634c3d5
parent68b76e99d1f7b696d49b5e99286401150072987a
mwifiex: failure path handling in mwifiex_add_virtual_intf()

1) If register_netdevice() is failed, we are freeing netdev
pointer, but priv->netdev is not cleared. This gives kernel
paging request error when driver is unloaded or interface is
deleted. Fix the problem by clearing the pointer.
2) Fix memory leak issue by freeing 'wdev' in failure paths.
Also, clear priv->wdev pointer.

As mwifiex_add_virtual_intf() successfully handles the
failure conditions, redundant code under err_add_intf label
is removed in this patch.

Reported-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/cfg80211.c
drivers/net/wireless/mwifiex/main.c