From: Markus Elfring <Markus.Elfring@web.de>
To: Navid Emamdoost <navid.emamdoost@gmail.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Cc: Jakub Kicinski <kubakici@wp.pl>,
linux-kernel@vger.kernel.org, Navid Emamdoost <emamd001@umn.edu>,
Matthias Brugger <matthias.bgg@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Kalle Valo <kvalo@codeaurora.org>
Subject: Re: [PATCH] mt7601u: add missing release on skb in mt7601u_mcu_msg_send
Date: Sat, 18 Jul 2020 16:48:52 +0200 [thread overview]
Message-ID: <080cc1d6-cbe2-65c7-fc78-861292bd46b9@web.de> (raw)
…
> +++ 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
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next reply other threads:[~2020-07-20 15:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-18 14:48 Markus Elfring [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-07-18 5:26 [PATCH] mt7601u: add missing release on skb in mt7601u_mcu_msg_send Navid Emamdoost
2020-07-20 15:54 ` Jakub Kicinski
2020-08-02 15:11 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=080cc1d6-cbe2-65c7-fc78-861292bd46b9@web.de \
--to=markus.elfring@web.de \
--cc=davem@davemloft.net \
--cc=emamd001@umn.edu \
--cc=kubakici@wp.pl \
--cc=kvalo@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=navid.emamdoost@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).