提交 8850494a 编写于 作者: D Dotan Barak 提交者: David S. Miller

net/mlx4_en: Fix resource leak in error flow

Wrong condition was used when calling iounmap.
Signed-off-by: NDotan Barak <dotanb@dev.mellanox.com>
Signed-off-by: NAmir Vadai <amirv@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2b9651d7
......@@ -310,7 +310,7 @@ static void *mlx4_en_add(struct mlx4_dev *dev)
err_mr:
(void) mlx4_mr_free(dev, &mdev->mr);
err_map:
if (!mdev->uar_map)
if (mdev->uar_map)
iounmap(mdev->uar_map);
err_uar:
mlx4_uar_free(dev, &mdev->priv_uar);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册