Re: [PATCH] mt7601u: add missing release on skb in mt7601u_mcu_msg_send

From: Markus Elfring
Date: Sat Jul 18 2020 - 10:49:28 EST


â
> +++ 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