[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b54b9abe-8271-ddc2-5346-7b63d5030189@users.sourceforge.net>
Date: Tue, 19 Jul 2016 22:11:20 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Inaky Perez-Gonzalez <inaky.perez-gonzalez@...el.com>,
linux-wimax@...el.com, netdev@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] WiMAX-i2400m: Delete an unnecessary check before the
function call "kfree_skb"
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Mon, 16 Nov 2015 11:17:55 +0100
>
> The kfree_skb() function tests whether its argument is NULL and then
> returns immediately. 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/net/wimax/i2400m/control.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c
> index 4c41790..4de22b7 100644
> --- a/drivers/net/wimax/i2400m/control.c
> +++ b/drivers/net/wimax/i2400m/control.c
> @@ -644,7 +644,7 @@ void i2400m_msg_to_dev_cancel_wait(struct i2400m *i2400m, int code)
>
> spin_lock_irqsave(&i2400m->rx_lock, flags);
> ack_skb = i2400m->ack_skb;
> - if (ack_skb && !IS_ERR(ack_skb))
> + if (!IS_ERR(ack_skb))
> kfree_skb(ack_skb);
> i2400m->ack_skb = ERR_PTR(code);
> spin_unlock_irqrestore(&i2400m->rx_lock, flags);
>
How do you think about to integrate this update suggestion
into another source code repository?
Regards,
Markus
Powered by blists - more mailing lists