diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2021-02-10 10:54:17 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-02-11 07:47:15 +0300 |
commit | b50c4892cb98417df96b73119c54520da34a3e88 (patch) | |
tree | 69ed7b5f4cc8c08acdf0fbfca4074ef906a7a220 /drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | |
parent | 2b6c3c1e74e53f370074eb03769c9499aa30c55a (diff) | |
download | linux-b50c4892cb98417df96b73119c54520da34a3e88.tar.xz |
net/mlx5: SF, Fix error return code in mlx5_sf_dev_probe()
Fix to return negative error code -ENOMEM from the ioremap() error
handling case instead of 0, as done elsewhere in this function.
Fixes: 1958fc2f0712 ("net/mlx5: SF, Add auxiliary device driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c index daf63a8115e0..c4bf555c25ea 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c @@ -37,6 +37,7 @@ static int mlx5_sf_dev_probe(struct auxiliary_device *adev, const struct auxilia mdev->iseg = ioremap(mdev->iseg_base, sizeof(*mdev->iseg)); if (!mdev->iseg) { mlx5_core_warn(mdev, "remap error\n"); + err = -ENOMEM; goto remap_err; } |