diff options
author | Eugenia Emantayev <eugenia@mellanox.co.il> | 2012-02-06 01:26:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-06 12:10:11 -0500 |
commit | f08ad06c05bf58ac38ad7b2fc97b243c12459ff2 (patch) | |
tree | 4451e3577163d8f8cb2f9474a1069384265bb241 /drivers/net/ethernet/mellanox/mlx4/cmd.c | |
parent | b530b1930bbd9d005345133f0ff0c556d2a52b19 (diff) |
mlx4_core: fix memory leak at multi_func_cleanup
Perform cleanup also in non-master flow.
The VFs use communication channel as well.
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/cmd.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/cmd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c index 405e6ac3faf6..eaf09d4f02d0 100644 --- a/drivers/net/ethernet/mellanox/mlx4/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c | |||
@@ -1616,12 +1616,12 @@ void mlx4_multi_func_cleanup(struct mlx4_dev *dev) | |||
1616 | kfree(priv->mfunc.master.slave_state[i].vlan_filter[port]); | 1616 | kfree(priv->mfunc.master.slave_state[i].vlan_filter[port]); |
1617 | } | 1617 | } |
1618 | kfree(priv->mfunc.master.slave_state); | 1618 | kfree(priv->mfunc.master.slave_state); |
1619 | iounmap(priv->mfunc.comm); | ||
1620 | dma_free_coherent(&(dev->pdev->dev), PAGE_SIZE, | ||
1621 | priv->mfunc.vhcr, | ||
1622 | priv->mfunc.vhcr_dma); | ||
1623 | priv->mfunc.vhcr = NULL; | ||
1624 | } | 1619 | } |
1620 | |||
1621 | iounmap(priv->mfunc.comm); | ||
1622 | dma_free_coherent(&(dev->pdev->dev), PAGE_SIZE, | ||
1623 | priv->mfunc.vhcr, priv->mfunc.vhcr_dma); | ||
1624 | priv->mfunc.vhcr = NULL; | ||
1625 | } | 1625 | } |
1626 | 1626 | ||
1627 | void mlx4_cmd_cleanup(struct mlx4_dev *dev) | 1627 | void mlx4_cmd_cleanup(struct mlx4_dev *dev) |