mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 07:24:39 +08:00
RDMA/mlx5: Properly check return value of mlx5_get_uars_page
Starting from commit72f36be061
("net/mlx5: Fix mlx5_get_uars_page to return error code") the mlx5_get_uars_page() call returns error in case of failure, but it was mistakenly overlooked in the merge commit. Fixes:e7996a9a77
("Merge tag v4.15 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git") Reported-by: Alaa Hleihel <alaa@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
84a6a7a99c
commit
444261ca6f
@ -5426,9 +5426,7 @@ static void mlx5_ib_stage_cong_debugfs_cleanup(struct mlx5_ib_dev *dev)
|
||||
static int mlx5_ib_stage_uar_init(struct mlx5_ib_dev *dev)
|
||||
{
|
||||
dev->mdev->priv.uar = mlx5_get_uars_page(dev->mdev);
|
||||
if (!dev->mdev->priv.uar)
|
||||
return -ENOMEM;
|
||||
return 0;
|
||||
return PTR_ERR_OR_ZERO(dev->mdev->priv.uar);
|
||||
}
|
||||
|
||||
static void mlx5_ib_stage_uar_cleanup(struct mlx5_ib_dev *dev)
|
||||
|
Loading…
Reference in New Issue
Block a user