提交 b1c49d14 编写于 作者: C Colin Ian King 提交者: David S. Miller

net_sched: remove redundant assignment to ret

The assignment of -EINVAL to variable ret is redundant as it
is being overwritten on the following error exit paths or
to the return value from the following call to basic_set_parms.
Fix this up by removing it. Cleans up clang warning message:

net/sched/cls_basic.c:185:2: warning: Value stored to 'err' is never read

Fixes: 1d8134fe ("net_sched: use idr to allocate basic filter handles")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Acked-by: NCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ef739d8a
......@@ -182,7 +182,6 @@ static int basic_change(struct net *net, struct sk_buff *in_skb,
if (err < 0)
goto errout;
err = -EINVAL;
if (handle) {
fnew->handle = handle;
if (!fold) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册