summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/testmode.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2021-05-27 13:35:29 +0200
committerFelix Fietkau <nbd@nbd.name>2021-06-19 09:22:46 +0200
commitd705ae86852d7676214c0a71479b52f528bdd0d1 (patch)
tree0323dca15510460e9007ad3b6d3306b32c7fe6ce /drivers/net/wireless/mediatek/mt76/testmode.c
parentmt76: testmode: fix memory leak in mt76_testmode_alloc_skb (diff)
downloadlinux-d705ae86852d7676214c0a71479b52f528bdd0d1.tar.xz
linux-d705ae86852d7676214c0a71479b52f528bdd0d1.zip
mt76: testmode: remove unnecessary function calls in mt76_testmode_free_skb
Get rid of unnecessary function calls in mt76_testmode_free_skb routine since they are already managed by dev_kfree_skb Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to '')
-rw-r--r--drivers/net/wireless/mediatek/mt76/testmode.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/testmode.c b/drivers/net/wireless/mediatek/mt76/testmode.c
index f40387a866ee..c516469278a4 100644
--- a/drivers/net/wireless/mediatek/mt76/testmode.c
+++ b/drivers/net/wireless/mediatek/mt76/testmode.c
@@ -88,17 +88,8 @@ static void
mt76_testmode_free_skb(struct mt76_phy *phy)
{
struct mt76_testmode_data *td = &phy->test;
- struct sk_buff *skb = td->tx_skb;
-
- if (!skb)
- return;
-
- if (skb_has_frag_list(skb)) {
- kfree_skb_list(skb_shinfo(skb)->frag_list);
- skb_shinfo(skb)->frag_list = NULL;
- }
- dev_kfree_skb(skb);
+ dev_kfree_skb(td->tx_skb);
td->tx_skb = NULL;
}