Message ID | 1619519456-61310-1-git-send-email-jiapeng.chong@linux.alibaba.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ad542fb7f2e2bb30c06381e77d4b29e895576ddc |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mpls: Remove redundant assignment to err | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | warning | 7 maintainers not CCed: gustavoars@kernel.org gnault@redhat.com martin.varghese@nokia.com clang-built-linux@googlegroups.com nathan@kernel.org ndesaulniers@google.com vfedorenko@novek.ru |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 7 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Tue, 27 Apr 2021 18:30:56 +0800 you wrote: > 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]. > > [...] Here is the summary with links: - mpls: Remove redundant assignment to err https://git.kernel.org/netdev/net-next/c/ad542fb7f2e2 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 47bab70..05a21dd 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);
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> --- net/mpls/af_mpls.c | 1 - 1 file changed, 1 deletion(-)