提交 1ae39a43 编写于 作者: P Patrick McHardy 提交者: David S. Miller

[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: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a5cdc030
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册