]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net_sched: remove redundant assignment to ret
authorColin Ian King <colin.king@canonical.com>
Fri, 29 Sep 2017 14:01:16 +0000 (15:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Oct 2017 03:08:00 +0000 (04:08 +0100)
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: 1d8134fea2eb ("net_sched: use idr to allocate basic filter handles")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_basic.c

index cfeb6f15856696b58c7fdb6b2b8261269fd22bfe..700b345b07f9f2922c6c32e77b49de10e684ff5a 100644 (file)
@@ -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) {