* [PATCH net-next] s390/ctcm: Delete unnecessary checks before the macro call “dev_kfree_skb”
@ 2019-09-15 17:21 Julian Wiedmann
2019-09-16 19:45 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Julian Wiedmann @ 2019-09-15 17:21 UTC (permalink / raw)
To: David Miller
Cc: netdev, linux-s390, Heiko Carstens, Stefan Raspl, Ursula Braun,
Markus Elfring, Julian Wiedmann
From: Markus Elfring <elfring@users.sourceforge.net>
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>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
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 2117870ed855..437a6d822105 100644
--- a/drivers/s390/net/ctcm_main.c
+++ b/drivers/s390/net/ctcm_main.c
@@ -1072,10 +1072,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.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] s390/ctcm: Delete unnecessary checks before the macro call “dev_kfree_skb”
2019-09-15 17:21 [PATCH net-next] s390/ctcm: Delete unnecessary checks before the macro call “dev_kfree_skb” Julian Wiedmann
@ 2019-09-16 19:45 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-09-16 19:45 UTC (permalink / raw)
To: jwi; +Cc: netdev, linux-s390, heiko.carstens, raspl, ubraun, elfring
From: Julian Wiedmann <jwi@linux.ibm.com>
Date: Sun, 15 Sep 2019 19:21:05 +0200
> From: Markus Elfring <elfring@users.sourceforge.net>
>
> 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>
> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-16 19:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-15 17:21 [PATCH net-next] s390/ctcm: Delete unnecessary checks before the macro call “dev_kfree_skb” Julian Wiedmann
2019-09-16 19:45 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox