linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Wiedmann <jwi@linux.ibm.com>
To: "Markus Elfring" <Markus.Elfring@web.de>,
	linux-s390@vger.kernel.org,
	"Christian Bornträger" <borntraeger@de.ibm.com>,
	"Heiko Carstens" <heiko.carstens@de.ibm.com>,
	"Ursula Braun" <ubraun@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] s390/ctcm: Delete unnecessary checks before the macro call “dev_kfree_skb”
Date: Sun, 25 Aug 2019 21:36:08 +0800	[thread overview]
Message-ID: <9b655bf1-8565-d768-04ee-bc286a7e9efe@linux.ibm.com> (raw)
In-Reply-To: <84733436-46d1-8f43-780e-7b3ab9f2a0ae@web.de>

On 22.08.19 17:04, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 22 Aug 2019 10:55:33 +0200
> 
> The dev_kfree_skb() function performs also input parameter validation.
> Thus the test around the shown calls is not needed.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---

Applied, thanks.

>  drivers/s390/net/ctcm_main.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c
> index f63c5c871d3d..90025d1923d2 100644
> --- a/drivers/s390/net/ctcm_main.c
> +++ b/drivers/s390/net/ctcm_main.c
> @@ -1074,10 +1074,8 @@ static void ctcm_free_netdevice(struct net_device *dev)
>  		if (grp) {
>  			if (grp->fsm)
>  				kfree_fsm(grp->fsm);
> -			if (grp->xid_skb)
> -				dev_kfree_skb(grp->xid_skb);
> -			if (grp->rcvd_xid_skb)
> -				dev_kfree_skb(grp->rcvd_xid_skb);
> +			dev_kfree_skb(grp->xid_skb);
> +			dev_kfree_skb(grp->rcvd_xid_skb);
>  			tasklet_kill(&grp->mpc_tasklet2);
>  			kfree(grp);
>  			priv->mpcg = NULL;
> --
> 2.23.0
> 


      reply	other threads:[~2019-08-25 13:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22  9:04 [PATCH] s390/ctcm: Delete unnecessary checks before the macro call “dev_kfree_skb” Markus Elfring
2019-08-25 13:36 ` Julian Wiedmann [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=9b655bf1-8565-d768-04ee-bc286a7e9efe@linux.ibm.com \
    --to=jwi@linux.ibm.com \
    --cc=Markus.Elfring@web.de \
    --cc=borntraeger@de.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=ubraun@linux.ibm.com \
    /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).