]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: mpls: remove unnecessary initialization of err
authorDavid Ahern <dsahern@gmail.com>
Sat, 27 May 2017 22:19:33 +0000 (16:19 -0600)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 May 2017 15:55:33 +0000 (11:55 -0400)
err is initialized to EINVAL and not used before it is set again.
Remove the unnecessary initialization.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mpls/af_mpls.c

index a953fcf169ba3b29fbadc1be6f95165665b365dd..94b3317232a65dd2818d3ab003f06fb21ce137cc 100644 (file)
@@ -743,8 +743,6 @@ static int mpls_nh_build_from_cfg(struct mpls_route_config *cfg,
        if (!nh)
                return -ENOMEM;
 
-       err = -EINVAL;
-
        nh->nh_labels = cfg->rc_output_labels;
        for (i = 0; i < nh->nh_labels; i++)
                nh->nh_label[i] = cfg->rc_output_label[i];