From: Quentin Deslandes <quentin.deslandes@itdev.co.uk>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
Forest Bond <forest@alittletooquiet.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] staging: vt6656: Delete an unnecessary check before the macro call “dev_kfree_skb”
Date: Wed, 21 Aug 2019 12:29:39 +0000 [thread overview]
Message-ID: <20190821122936.GA17249@qd-ubuntu> (raw)
In-Reply-To: <ff6e12fb-f144-351b-25e9-a864b58d7acf@web.de>
On Wed, Aug 21, 2019 at 02:07:56PM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 21 Aug 2019 13:56:35 +0200
>
> The dev_kfree_skb() function performs also input parameter validation.
> Thus the test around the call is not needed.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/staging/vt6656/main_usb.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
> index 856ba97aec4f..f57e890659aa 100644
> --- a/drivers/staging/vt6656/main_usb.c
> +++ b/drivers/staging/vt6656/main_usb.c
> @@ -422,8 +422,7 @@ static void vnt_free_rx_bufs(struct vnt_private *priv)
> }
>
> /* deallocate skb */
> - if (rcb->skb)
> - dev_kfree_skb(rcb->skb);
> + dev_kfree_skb(rcb->skb);
>
> kfree(rcb);
> }
> --
> 2.23.0
>
Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk>
Regards,
Quentin
prev parent reply other threads:[~2019-08-21 12:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 12:07 [PATCH] staging: vt6656: Delete an unnecessary check before the macro call “dev_kfree_skb” Markus Elfring
2019-08-21 12:29 ` Quentin Deslandes [this message]
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=20190821122936.GA17249@qd-ubuntu \
--to=quentin.deslandes@itdev.co.uk \
--cc=Markus.Elfring@web.de \
--cc=devel@driverdev.osuosl.org \
--cc=forest@alittletooquiet.net \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@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