Commit 8850494a authored by Dotan Barak's avatar Dotan Barak Committed by David S. Miller

net/mlx4_en: Fix resource leak in error flow

Wrong condition was used when calling iounmap.
Signed-off-by: default avatarDotan Barak <dotanb@dev.mellanox.com>
Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment