mlxsw: spectrum_ptp: fix duplicated check on orig_egr_types
authorColin Ian King <colin.king@canonical.com>
Tue, 30 Jul 2019 11:47:52 +0000 (12:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Jul 2019 17:19:47 +0000 (10:19 -0700)
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: c6b36bdd04b5 ("mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c

index 98c5ba3200bca23a8ef0b2b1c66d7e63b4eac649..63b07edd9d8161304793e7321b5c3ea726416a1e 100644 (file)
@@ -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);
                if (err) {
                        netdev_err(mlxsw_sp_port->dev, "Failed to increase parsing depth");
                        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);
 
        return mlxsw_sp1_ptp_mtpppc_set(mlxsw_sp_port->mlxsw_sp,