net/mlx5: Fix mlx5_get_uars_page to return error code
authorEran Ben Elisha <eranbe@mellanox.com>
Mon, 20 Nov 2017 07:58:01 +0000 (09:58 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 12 Jan 2018 00:01:47 +0000 (02:01 +0200)
commit72f36be06138bdc11bdbe1f04e4a3e2637ea438d
treeab975a43730639e212df98c5dccd97752c0de441
parentb6908c296021a99ba2a83a4b4703eb9e6365e5dc
net/mlx5: Fix mlx5_get_uars_page to return error code

Change mlx5_get_uars_page to return ERR_PTR in case of
allocation failure. Change all callers accordingly to
check the IS_ERR(ptr) instead of NULL.

Fixes: 59211bd3b632 ("net/mlx5: Split the load/unload flow into hardware and software flows")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/infiniband/hw/mlx5/main.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/uar.c