[PATCH] mt7601u: add missing release on skb in mt7601u_mcu_msg_send
Markus Elfring
Markus.Elfring at web.de
Sat Jul 18 10:48:52 EDT 2020
…
> +++ b/drivers/net/wireless/mediatek/mt7601u/mcu.c
> @@ -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;
> + }
…
How do you think about to use the the following statements instead
in the if branch?
ret = 0;
goto consume_skb;
Would you like to add the tag “Fixes” to the commit message?
Regards,
Markus
More information about the Linux-mediatek
mailing list