aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/intel-pt-events.py
diff options
context:
space:
mode:
authorNathan Chancellor <[email protected]>2022-08-25 11:06:07 -0700
committerJakub Kicinski <[email protected]>2022-08-30 23:16:47 -0700
commit92f97c00f0ca538fe820c0b18b6f957a69410689 (patch)
tree062dd86e4874347da027213136d1ad0152c1095a /tools/perf/scripts/python/intel-pt-events.py
parent4f99de7b181f926a3f8d71fec74fd80e2ee8d9c2 (diff)
net/mlx5e: Do not use err uninitialized in mlx5e_rep_add_meta_tunnel_rule()
Clang warns: drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:481:6: error: variable 'err' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (IS_ERR(flow_rule)) { ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:489:9: note: uninitialized use occurs here return err; ^~~ drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:481:2: note: remove the 'if' if its condition is always true if (IS_ERR(flow_rule)) { ^~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:474:9: note: initialize the variable 'err' to silence this warning int err; ^ = 0 1 error generated. There is little reason to have the 'goto + error variable' construct in this function. Get rid of it and just return the PTR_ERR value in the if statement and 0 at the end. Fixes: 430e2d5e2a98 ("net/mlx5: E-Switch, Move send to vport meta rule creation") Link: https://github.com/ClangBuiltLinux/linux/issues/1695 Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions