diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-07-01 15:39:42 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-07-05 16:27:50 +0300 |
commit | f152bdad62083f654e22ba4840c5131865de9dca (patch) | |
tree | 78d82f1ff32b6eaf40215a7b137810e26ac0f71c /drivers/net/wireless | |
parent | df429195198e75cb0b67ce447606707a9bcc431e (diff) | |
download | lwn-f152bdad62083f654e22ba4840c5131865de9dca.tar.gz lwn-f152bdad62083f654e22ba4840c5131865de9dca.zip |
mwifiex: fix unconditional error return in .add_virtual_intf callback
The commit 7311ea850079 ("mwifiex: fix AP start problem for newly added
interface") attempted to fix an issue when a new AP interface is added.
But the patch didn't check the return value of the functions doing the
firmware calls and returned an error even if the functions didn't fail.
This prevents the network device to be registered properly, so fix it.
Fixes: 7311ea850079 ("mwifiex: fix AP start problem for newly added interface")
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index 99e8cf1ad610..5de9f63e2c01 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -2865,9 +2865,11 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy, ret = mwifiex_send_cmd(priv, HostCmd_CMD_SET_BSS_MODE, HostCmd_ACT_GEN_SET, 0, NULL, true); + if (ret) return ERR_PTR(ret); ret = mwifiex_sta_init_cmd(priv, false, false); + if (ret) return ERR_PTR(ret); mwifiex_setup_ht_caps(&wiphy->bands[NL80211_BAND_2GHZ]->ht_cap, priv); |