]> Git Repo - linux.git/commitdiff
net/mlx5e: Fix error flow in tx reporter diagnose
authorAya Levin <[email protected]>
Sun, 30 Jun 2019 08:11:26 +0000 (11:11 +0300)
committerSaeed Mahameed <[email protected]>
Thu, 11 Jul 2019 18:45:04 +0000 (11:45 -0700)
Fix tx reporter's diagnose callback. Propagate error when failing to
gather diagnostics information or failing to print diagnostic data per
queue.

Fixes: de8650a82071 ("net/mlx5e: Add tx reporter support")
Signed-off-by: Aya Levin <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c

index a778c15e53241ccb3561d9221ac830c444a51502..f3d98748b2117575ad64c83b2bb962ec7a718786 100644 (file)
@@ -262,13 +262,13 @@ static int mlx5e_tx_reporter_diagnose(struct devlink_health_reporter *reporter,
 
                err = mlx5_core_query_sq_state(priv->mdev, sq->sqn, &state);
                if (err)
-                       break;
+                       goto unlock;
 
                err = mlx5e_tx_reporter_build_diagnose_output(fmsg, sq->sqn,
                                                              state,
                                                              netif_xmit_stopped(sq->txq));
                if (err)
-                       break;
+                       goto unlock;
        }
        err = devlink_fmsg_arr_pair_nest_end(fmsg);
        if (err)
This page took 0.051371 seconds and 4 git commands to generate.