diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-04-27 18:30:56 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-27 14:17:00 -0700 |
commit | ad542fb7f2e2bb30c06381e77d4b29e895576ddc (patch) | |
tree | a85ad797c98c4e9458692efb00aa697c30d76f4e | |
parent | 2342eb1afe00586a018536c4bf9e04d7aa4bf63e (diff) | |
download | linux-ad542fb7f2e2bb30c06381e77d4b29e895576ddc.tar.gz linux-ad542fb7f2e2bb30c06381e77d4b29e895576ddc.tar.bz2 linux-ad542fb7f2e2bb30c06381e77d4b29e895576ddc.zip |
mpls: Remove redundant assignment to err
Variable err is set to -ENOMEM but this value is never read as it is
overwritten with a new value later on, hence it is a redundant
assignment and can be removed.
Cleans up the following clang-analyzer warning:
net/mpls/af_mpls.c:1022:2: warning: Value stored to 'err' is never read
[clang-analyzer-deadcode.DeadStores].
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/mpls/af_mpls.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 47bab701555f..05a21dd072df 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@ -1019,7 +1019,6 @@ static int mpls_route_add(struct mpls_route_config *cfg, goto errout; } - err = -ENOMEM; rt = mpls_rt_alloc(nhs, max_via_alen, max_labels); if (IS_ERR(rt)) { err = PTR_ERR(rt); |