diff mbox

mt76: fix returnvar.cocci warnings

Message ID alpine.DEB.2.20.1702021503060.3104@hadrien (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Julia Lawall Feb. 2, 2017, 2:04 p.m. UTC
Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 mt76x2_main.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

--- a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
@@ -83,7 +83,6 @@  mt76x2_add_interface(struct ieee80211_hw
 	struct mt76x2_dev *dev = hw->priv;
 	struct mt76x2_vif *mvif = (struct mt76x2_vif *) vif->drv_priv;
 	unsigned int idx = 0;
-	int ret = 0;

 	if (vif->addr[0] & BIT(1))
 		idx = 1 + (((dev->mt76.macaddr[0] ^ vif->addr[0]) >> 2) & 7);
@@ -109,7 +108,7 @@  mt76x2_add_interface(struct ieee80211_hw
 	mvif->group_wcid.hw_key_idx = -1;
 	mt76x2_txq_init(dev, vif->txq);

-	return ret;
+	return 0;
 }

 static void