aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/mcg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mlx4/mcg.c')
-rw-r--r--drivers/net/mlx4/mcg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/mlx4/mcg.c b/drivers/net/mlx4/mcg.c
index e71372aa9cc4..c6d336aed2d9 100644
--- a/drivers/net/mlx4/mcg.c
+++ b/drivers/net/mlx4/mcg.c
@@ -111,7 +111,7 @@ static int new_steering_entry(struct mlx4_dev *dev, u8 vep_num, u8 port,
111 u32 members_count; 111 u32 members_count;
112 struct mlx4_steer_index *new_entry; 112 struct mlx4_steer_index *new_entry;
113 struct mlx4_promisc_qp *pqp; 113 struct mlx4_promisc_qp *pqp;
114 struct mlx4_promisc_qp *dqp; 114 struct mlx4_promisc_qp *dqp = NULL;
115 u32 prot; 115 u32 prot;
116 int err; 116 int err;
117 u8 pf_num; 117 u8 pf_num;
@@ -184,7 +184,7 @@ out_mailbox:
184out_alloc: 184out_alloc:
185 if (dqp) { 185 if (dqp) {
186 list_del(&dqp->list); 186 list_del(&dqp->list);
187 kfree(&dqp); 187 kfree(dqp);
188 } 188 }
189 list_del(&new_entry->list); 189 list_del(&new_entry->list);
190 kfree(new_entry); 190 kfree(new_entry);
@@ -469,7 +469,6 @@ static int remove_promisc_qp(struct mlx4_dev *dev, u8 vep_num, u8 port,
469 469
470 /*remove from list of promisc qps */ 470 /*remove from list of promisc qps */
471 list_del(&pqp->list); 471 list_del(&pqp->list);
472 kfree(pqp);
473 472
474 /* set the default entry not to include the removed one */ 473 /* set the default entry not to include the removed one */
475 mailbox = mlx4_alloc_cmd_mailbox(dev); 474 mailbox = mlx4_alloc_cmd_mailbox(dev);
@@ -528,6 +527,8 @@ out_mailbox:
528out_list: 527out_list:
529 if (back_to_list) 528 if (back_to_list)
530 list_add_tail(&pqp->list, &s_steer->promisc_qps[steer]); 529 list_add_tail(&pqp->list, &s_steer->promisc_qps[steer]);
530 else
531 kfree(pqp);
531out_mutex: 532out_mutex:
532 mutex_unlock(&priv->mcg_table.mutex); 533 mutex_unlock(&priv->mcg_table.mutex);
533 return err; 534 return err;