lkml.org 
[lkml]   [2020]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mt7601u: add missing release on skb in mt7601u_mcu_msg_send
From
Date

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

\
 
 \ /
  Last update: 2020-07-18 16:50    [W:0.024 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site