Message ID | 20201118132502.461098-1-colin.king@canonical.com (mailing list archive) |
---|---|
State | Accepted |
Commit | dd6028a3cb5da85d6c8ff20a593a7a70d10d650c |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [next] octeontx2-af: Fix return of uninitialized variable 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/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, 8 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Wed, 18 Nov 2020 13:25:02 +0000 you wrote: > From: Colin Ian King <colin.king@canonical.com> > > Currently the variable err may be uninitialized if several of the if > statements are not executed in function nix_tx_vtag_decfg and a garbage > value in err is returned. Fix this by initialized ret at the start of > the function. > > [...] Here is the summary with links: - [next] octeontx2-af: Fix return of uninitialized variable err https://git.kernel.org/netdev/net-next/c/dd6028a3cb5d You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c index e8d039503097..739b37034bdf 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c @@ -2085,7 +2085,7 @@ static int nix_tx_vtag_decfg(struct rvu *rvu, int blkaddr, u16 pcifunc = req->hdr.pcifunc; int idx0 = req->tx.vtag0_idx; int idx1 = req->tx.vtag1_idx; - int err; + int err = 0; if (req->tx.free_vtag0 && req->tx.free_vtag1) if (vlan->entry2pfvf_map[idx0] != pcifunc ||