Commit 2ad07086 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

mlxsw: spectrum_ptp: fix duplicated check on orig_egr_types

Currently are duplicated checks on orig_egr_types which are
redundant, I believe this is a typo and should actually be
orig_ing_types || orig_egr_types instead of the expression
orig_egr_types || orig_egr_types.  Fix these.

Addresses-Coverity: ("Same on both sides")
Fixes: c6b36bdd ("mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 43c8e0ae
...@@ -999,14 +999,14 @@ static int mlxsw_sp1_ptp_mtpppc_update(struct mlxsw_sp_port *mlxsw_sp_port, ...@@ -999,14 +999,14 @@ static int mlxsw_sp1_ptp_mtpppc_update(struct mlxsw_sp_port *mlxsw_sp_port,
} }
} }
if ((ing_types || egr_types) && !(orig_egr_types || orig_egr_types)) { if ((ing_types || egr_types) && !(orig_ing_types || orig_egr_types)) {
err = mlxsw_sp_nve_inc_parsing_depth_get(mlxsw_sp); err = mlxsw_sp_nve_inc_parsing_depth_get(mlxsw_sp);
if (err) { if (err) {
netdev_err(mlxsw_sp_port->dev, "Failed to increase parsing depth"); netdev_err(mlxsw_sp_port->dev, "Failed to increase parsing depth");
return err; return err;
} }
} }
if (!(ing_types || egr_types) && (orig_egr_types || orig_egr_types)) if (!(ing_types || egr_types) && (orig_ing_types || orig_egr_types))
mlxsw_sp_nve_inc_parsing_depth_put(mlxsw_sp); mlxsw_sp_nve_inc_parsing_depth_put(mlxsw_sp);
return mlxsw_sp1_ptp_mtpppc_set(mlxsw_sp_port->mlxsw_sp, return mlxsw_sp1_ptp_mtpppc_set(mlxsw_sp_port->mlxsw_sp,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment