Skip to contentSkip to conversation

mwifiex: fix mwifiex_add_virtual_intf()

PATCH In review Dan Carpenter 2 participants 2 messages Jul 2, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mwifiex: fix mwifiex_add_virtual_intf()

We accidentally left some if statements out so the mwifiex_add_virtual_intf() function returns early.

Fixes 7311ea850079 ('mwifiex: fix AP start problem for newly added interface')
drivers/net/wireless/marvell/mwifiex/cfg80211.c +2 -0
index 99e8cf1..5de9f63 100644
@@ -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);
#1 lore raw
Quoted 5 lines · Dan Carpenter

We accidentally left some if statements out so the mwifiex_add_virtual_intf() function returns early.

Fixes 7311ea850079 ('mwifiex: fix AP start problem for newly added interface')

Someone beat you to it [1] ;-)

Regards,
Arend

[1]
http://mid.gmane.org/[email protected]

Quoted 21 lines
drivers/net/wireless/marvell/mwifiex/cfg80211.c +2 -1
index 99e8cf1..5de9f63 100644
@@ -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);
--

To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html