]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
mlxsw: spectrum_qdisc: Drop an always-true condition
authorPetr Machata <petrm@nvidia.com>
Tue, 20 Apr 2021 14:53:41 +0000 (16:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Apr 2021 23:43:13 +0000 (16:43 -0700)
The function mlxsw_sp_qdisc_compare() is invoked a couple lines above this
check, which will bounce any requests where this condition does not hold.
Therefore drop it.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c

index 013398ecd15b18d930617a9898f8792863559592..f1d32bfc4bedf8dd4fae21fad179b15bc25c2e4e 100644 (file)
@@ -886,10 +886,7 @@ int mlxsw_sp_setup_tc_fifo(struct mlxsw_sp_port *mlxsw_sp_port,
 
        switch (p->command) {
        case TC_FIFO_DESTROY:
-               if (p->handle == mlxsw_sp_qdisc->handle)
-                       return mlxsw_sp_qdisc_destroy(mlxsw_sp_port,
-                                                     mlxsw_sp_qdisc);
-               return 0;
+               return mlxsw_sp_qdisc_destroy(mlxsw_sp_port, mlxsw_sp_qdisc);
        case TC_FIFO_STATS:
                return mlxsw_sp_qdisc_get_stats(mlxsw_sp_port, mlxsw_sp_qdisc,
                                                &p->stats);