From 1ae39a430b692552e5aceb63fa35ce95fcbadc6a Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Thu, 23 Mar 2006 01:16:48 -0800 Subject: [NET_SCHED]: cls_u32: remove unnecessary NULL-ptr check In both cases n can't be NULL without crashing anyway. Coverity #78 Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- net/sched/cls_u32.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 2b670479dde..78e052591fa 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c @@ -347,8 +347,7 @@ static int u32_destroy_key(struct tcf_proto *tp, struct tc_u_knode *n) if (n->ht_down) n->ht_down->refcnt--; #ifdef CONFIG_CLS_U32_PERF - if (n) - kfree(n->pf); + kfree(n->pf); #endif kfree(n); return 0; @@ -680,8 +679,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, return 0; } #ifdef CONFIG_CLS_U32_PERF - if (n) - kfree(n->pf); + kfree(n->pf); #endif kfree(n); return err; -- cgit v1.2.3