netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] net/sched/cls_bpf.c: remove null test before kfree
@ 2014-06-20 20:33 Fabian Frederick
  0 siblings, 0 replies; only message in thread
From: Fabian Frederick @ 2014-06-20 20:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Jamal Hadi Salim, David S. Miller, netdev

Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 net/sched/cls_bpf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
index 13f64df..715367a 100644
--- a/net/sched/cls_bpf.c
+++ b/net/sched/cls_bpf.c
@@ -212,8 +212,7 @@ static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp,
 
 	if (fp_old)
 		sk_unattached_filter_destroy(fp_old);
-	if (bpf_old)
-		kfree(bpf_old);
+	kfree(bpf_old);
 
 	return 0;
 
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-20 20:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-20 20:33 [PATCH 1/1] net/sched/cls_bpf.c: remove null test before kfree Fabian Frederick

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).