]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-af: Fix return of uninitialized variable err
authorColin Ian King <colin.king@canonical.com>
Wed, 18 Nov 2020 13:25:02 +0000 (13:25 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 20 Nov 2020 19:06:10 +0000 (11:06 -0800)
commit8348990bae774516d71f6154d968a6219318c87d
tree88662a6f3606a6f1aaa8e93678816bf571ee5ee4
parentf6aaf8be30737e18154649af9b5cd310a16930fd
octeontx2-af: Fix return of uninitialized variable err

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.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 5f32902b5e66 ("octeontx2-af: Modify nix_vtag_cfg mailbox to support TX VTAG entries")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20201118132502.461098-1-colin.king@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c