[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210210075417.1096059-1-weiyongjun1@huawei.com>
Date: Wed, 10 Feb 2021 07:54:17 +0000
From: Wei Yongjun <weiyongjun1@...wei.com>
To: Hulk Robot <hulkci@...wei.com>, Saeed Mahameed <saeedm@...dia.com>,
"Leon Romanovsky" <leon@...nel.org>,
Jakub Kicinski <kuba@...nel.org>,
Parav Pandit <parav@...dia.com>, Vu Pham <vuhuong@...dia.com>
CC: Wei Yongjun <weiyongjun1@...wei.com>, <netdev@...r.kernel.org>,
<linux-rdma@...r.kernel.org>
Subject: [PATCH net-next] 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@...wei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
.../net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | 1 +
1 file changed, 1 insertion(+)
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;
}
Powered by blists - more mailing lists