UPSTREAM: mwifiex: fix wrong return values in add_virtual_intf() error cases
authorBing Zhao <bzhao@marvell.com>
Thu, 2 Aug 2012 21:52:20 +0000 (14:52 -0700)
committerGerrit <chrome-bot@google.com>
Fri, 3 Aug 2012 00:45:14 +0000 (17:45 -0700)
commit273071beb740e32d4730252a8f8f1dcdb5f86348
tree528df374ea6f8401ee7d198ba89096a2c8d49e9c
parentf80b74db9e170f11049056ed3159b3e0c80b5981
UPSTREAM: 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>
BUG=chrome-os-partner:12190
TEST=Build and run autotest WiFiMatFunc, WiFiSecMat, WiFiManager, WiFiPerf

Change-Id: I90c07d50d50f25476a0495b3beff6a9b3f74226d
Reviewed-on: https://gerrit.chromium.org/gerrit/29091
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
drivers/net/wireless/mwifiex/cfg80211.c