summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2020-05-27 10:50:22 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2020-05-30 07:20:20 +0300
commit2861904697de587c5b92c65a18a44ca3bbfd00ed (patch)
tree6b1b45d1183267b1f3bd4af17c33e9878f63440b /net
parent2950d1d64fd035726b4b060313f931ed52e3615f (diff)
downloadlinux-2861904697de587c5b92c65a18a44ca3bbfd00ed.tar.xz
net/mlx5e: Don't use err uninitialized in mlx5e_attach_decap
Clang warns: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:3712:6: warning: variable 'err' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (IS_ERR(d->pkt_reformat)) { ^~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:3718:6: note: uninitialized use occurs here if (err) ^~~ drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:3712:2: note: remove the 'if' if its condition is always true if (IS_ERR(d->pkt_reformat)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:3670:9: note: initialize the variable 'err' to silence this warning int err; ^ = 0 1 warning generated. It is not wrong, err is only ever initialized in if statements but this one is not in one. Initialize err to 0 to fix this. Fixes: 14e6b038afa0 ("net/mlx5e: Add support for hw decapsulation of MPLS over UDP") Link: https://github.com/ClangBuiltLinux/linux/issues/1037 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions