mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 18:53:52 +08:00
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: Dotan Barak <dotanb@dev.mellanox.co.il> Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
3cf164c8de
commit
41929ed265
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user