summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDotan Barak <dotanb@dev.mellanox.com>2013-06-25 13:09:29 +0400
committerDavid S. Miller <davem@davemloft.net>2013-06-26 03:29:38 +0400
commit8850494a33cc67bbf31d2e3ce630d0f4e14efa56 (patch)
tree14eef123281ca4b6da2392c19b858bc2898b7d65 /drivers
parent2b9651d72d3fc1a9053ae1a323f8407e1f63b436 (diff)
downloadlinux-8850494a33cc67bbf31d2e3ce630d0f4e14efa56.tar.xz
net/mlx4_en: Fix resource leak in error flow
Wrong condition was used when calling iounmap. Signed-off-by: Dotan Barak <dotanb@dev.mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_main.c b/drivers/net/ethernet/mellanox/mlx4/en_main.c
index a5c9df07a7d0..a071cda2dd04 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_main.c
@@ -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);