* [PATCH] mt76: mt7915: remove dead code in mt7915_get_et_stats
@ 2021-10-18 13:57 Lorenzo Bianconi
0 siblings, 0 replies; only message in thread
From: Lorenzo Bianconi @ 2021-10-18 13:57 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless, lorenzo.bianconi, sean.wang, greearb
Remove phy check in mt7915_get_et_stats since hw is received from mac80211
and it can't be NULL
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7915/main.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index 7210a1db2050..d56c8456cd2b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -1213,11 +1213,7 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
struct mib_stats *mib = &phy->mib;
/* See mt7915_ampdu_stat_read_phy, etc */
bool ext_phy = phy != &dev->phy;
- int i, n;
- int ei = 0;
-
- if (!phy)
- return;
+ int i, n, ei = 0;
mutex_lock(&dev->mt76.mutex);
--
2.31.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-18 14:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18 13:57 [PATCH] mt76: mt7915: remove dead code in mt7915_get_et_stats Lorenzo Bianconi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).