From: Figo.zhang Date: Mon, 8 Jun 2009 07:40:35 +0000 (-0700) Subject: net pkgen.c:fix no need for check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1d0ebfe7c9621d43804e9ce9f2b898541a7d9652;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git net pkgen.c:fix no need for check vfree() does its own 'NULL' check, so no need for check before calling it. Signed-off-by: Figo.zhang Signed-off-by: David S. Miller --- diff --git a/net/core/pktgen.c b/net/core/pktgen.c index b8ccd3c88d6..19b8c20e98a 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -3691,8 +3691,7 @@ out1: #ifdef CONFIG_XFRM free_SAs(pkt_dev); #endif - if (pkt_dev->flows) - vfree(pkt_dev->flows); + vfree(pkt_dev->flows); kfree(pkt_dev); return err; } @@ -3791,8 +3790,7 @@ static int pktgen_remove_device(struct pktgen_thread *t, #ifdef CONFIG_XFRM free_SAs(pkt_dev); #endif - if (pkt_dev->flows) - vfree(pkt_dev->flows); + vfree(pkt_dev->flows); kfree(pkt_dev); return 0; }