Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux