mwifiex: fix wrong return values in add_virtual_intf() error cases
authorBing Zhao <bzhao@marvell.com>
Wed, 4 Jul 2012 03:43:56 +0000 (20:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jul 2012 16:04:40 +0000 (09:04 -0700)
commit445006de7c59a9086b00025f9c3c97c75effd3c5
treec7f4c6ed7a2225054fd262f741ba5460e1332268
parent4943d9cb7d82218d196ccc034ecaf933298e7e95
mwifiex: fix wrong return values in add_virtual_intf() error cases

commit 858faa57dd9e2b91f3f870fbb1185982e42f5a2b upstream

add_virtual_intf() needs to return an ERR_PTR(), instead of NULL,
on errors, otherwise cfg80211 will crash.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/mwifiex/cfg80211.c