Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);