提交 2b74e2ca 编写于 作者: D Duan Jiong 提交者: David S. Miller

net: em_canid: remove useless statements from em_canid_change

tcf_ematch is allocated by kzalloc in function tcf_em_tree_validate(),
so cm_old is always NULL.
Signed-off-by: NDuan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a3f5ee71
......@@ -125,7 +125,6 @@ static int em_canid_change(struct tcf_proto *tp, void *data, int len,
{
struct can_filter *conf = data; /* Array with rules */
struct canid_match *cm;
struct canid_match *cm_old = (struct canid_match *)m->data;
int i;
if (!len)
......@@ -181,12 +180,6 @@ static int em_canid_change(struct tcf_proto *tp, void *data, int len,
m->datalen = sizeof(struct canid_match) + len;
m->data = (unsigned long)cm;
if (cm_old != NULL) {
pr_err("canid: Configuring an existing ematch!\n");
kfree(cm_old);
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册