]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix uninitialized variable
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Tue, 31 Jul 2018 14:21:57 +0000 (09:21 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Aug 2018 16:38:05 +0000 (09:38 -0700)
commitaf420e92a2a927c5325e02537f3699c234cf4a77
tree00ae6c14f7e91edce0d7a876e080f88baad1dd09
parent10d37e760ba3603d3379f5476cb6565ff3dd892f
net/mlx5e: Fix uninitialized variable

There is a potential execution path in which variable *err* is returned
without being properly initialized previously.

Fix this by initializing variable *err* to 0.

Addresses-Coverity-ID: 1472116 ("Uninitialized scalar variable")
Fixes: 9d2e58c87fd1 ("net/mlx5e: Gather all XDP pre-requisite checks in a single function")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c