summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorFigo.zhang <figo1802@gmail.com>2009-06-08 09:40:35 +0200
committerDavid S. Miller <davem@davemloft.net>2009-06-08 09:40:35 +0200
commit1d0ebfe7c9621d43804e9ce9f2b898541a7d9652 (patch)
treeb13375888879581888bc4d773adcc55bf7d1e6ca /net/core
parentmlx4: FIX error flow when initializing EQ table (diff)
downloadlinux-1d0ebfe7c9621d43804e9ce9f2b898541a7d9652.tar.xz
linux-1d0ebfe7c9621d43804e9ce9f2b898541a7d9652.zip
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 <figo1802@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/pktgen.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index b8ccd3c88d63..19b8c20e98a4 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;
}