Commit b0f64463 authored by Carol L Soto's avatar Carol L Soto Committed by David S. Miller

net/mlx4_core: Fix unintialized variable used in error path

The uninitialized value name in mlx4_en_activate_cq was used in order
to print an error message. Fixing it by replacing it with cq->vector.
Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
Signed-off-by: default avatarCarol L Soto <clsoto@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9293267a
...@@ -100,7 +100,6 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq, ...@@ -100,7 +100,6 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq,
{ {
struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_dev *mdev = priv->mdev;
int err = 0; int err = 0;
char name[25];
int timestamp_en = 0; int timestamp_en = 0;
bool assigned_eq = false; bool assigned_eq = false;
...@@ -119,8 +118,8 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq, ...@@ -119,8 +118,8 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq,
err = mlx4_assign_eq(mdev->dev, priv->port, err = mlx4_assign_eq(mdev->dev, priv->port,
&cq->vector); &cq->vector);
if (err) { if (err) {
mlx4_err(mdev, "Failed assigning an EQ to %s\n", mlx4_err(mdev, "Failed assigning an EQ to CQ vector %d\n",
name); cq->vector);
goto free_eq; goto free_eq;
} }
......
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