[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 <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a5cdc03003
commit
1ae39a430b
@@ -347,7 +347,6 @@ static int u32_destroy_key(struct tcf_proto *tp, struct tc_u_knode *n)
|
|||||||
if (n->ht_down)
|
if (n->ht_down)
|
||||||
n->ht_down->refcnt--;
|
n->ht_down->refcnt--;
|
||||||
#ifdef CONFIG_CLS_U32_PERF
|
#ifdef CONFIG_CLS_U32_PERF
|
||||||
if (n)
|
|
||||||
kfree(n->pf);
|
kfree(n->pf);
|
||||||
#endif
|
#endif
|
||||||
kfree(n);
|
kfree(n);
|
||||||
@@ -680,7 +679,6 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_CLS_U32_PERF
|
#ifdef CONFIG_CLS_U32_PERF
|
||||||
if (n)
|
|
||||||
kfree(n->pf);
|
kfree(n->pf);
|
||||||
#endif
|
#endif
|
||||||
kfree(n);
|
kfree(n);
|
||||||
|
Reference in New Issue
Block a user