Commit 880e2149 authored by Navid Emamdoost's avatar Navid Emamdoost Committed by Kalle Valo

mt7601u: add missing release on skb in mt7601u_mcu_msg_send

In the implementation of mt7601u_mcu_msg_send(), skb is supposed to be
consumed on all execution paths. Release skb before returning if
test_bit() fails.
Signed-off-by: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
Acked-by: default avatarJakub Kicinski <kubakici@wp.pl>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200718052630.11032-1-navid.emamdoost@gmail.com
parent 3f4600de
......@@ -116,8 +116,10 @@ mt7601u_mcu_msg_send(struct mt7601u_dev *dev, struct sk_buff *skb,
int sent, ret;
u8 seq = 0;
if (test_bit(MT7601U_STATE_REMOVED, &dev->state))
if (test_bit(MT7601U_STATE_REMOVED, &dev->state)) {
consume_skb(skb);
return 0;
}
mutex_lock(&dev->mcu.mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment