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

Commit 41929ed2 authored by Dotan Barak's avatar Dotan Barak Committed by Roland Dreier
Browse files

mlx4_core: Perform correct resource cleanup if mlx4_QUERY_ADAPTER() fails



Fixed the resource cleanup to act correctly and prevent a kernel oops when
mlx4_QUERY_ADAPTER() fails.

Signed-off-by: default avatarDotan Barak <dotanb@dev.mellanox.co.il>
Reviewed-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 3cf164c8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1405,7 +1405,10 @@ unmap_bf:
	unmap_bf_area(dev);

err_close:
	mlx4_close_hca(dev);
	if (mlx4_is_slave(dev))
		mlx4_slave_exit(dev);
	else
		mlx4_CLOSE_HCA(dev, 0);

err_free_icm:
	if (!mlx4_is_slave(dev))