[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190821122936.GA17249@qd-ubuntu>
Date: Wed, 21 Aug 2019 12:29:39 +0000
From: Quentin Deslandes <quentin.deslandes@...ev.co.uk>
To: Markus Elfring <Markus.Elfring@....de>
CC: "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
Forest Bond <forest@...ttletooquiet.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
LKML <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH] staging: vt6656: Delete an unnecessary check before the macro call “dev_kfree_skb”
On Wed, Aug 21, 2019 at 02:07:56PM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.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@...rs.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@...ev.co.uk>
Regards,
Quentin
Powered by blists - more mailing lists