netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net/mlx5: SF, Fix error return code in mlx5_sf_dev_probe()
@ 2021-02-10  7:54 Wei Yongjun
  2021-02-10  8:03 ` Leon Romanovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2021-02-10  7:54 UTC (permalink / raw)
  To: Hulk Robot, Saeed Mahameed, Leon Romanovsky, Jakub Kicinski,
	Parav Pandit, Vu Pham
  Cc: Wei Yongjun, netdev, linux-rdma

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>
---
 .../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;
 	}
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net/mlx5: SF, Fix error return code in mlx5_sf_dev_probe()
  2021-02-10  7:54 [PATCH net-next] net/mlx5: SF, Fix error return code in mlx5_sf_dev_probe() Wei Yongjun
@ 2021-02-10  8:03 ` Leon Romanovsky
  2021-02-11  4:17   ` Saeed Mahameed
  0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2021-02-10  8:03 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Hulk Robot, Saeed Mahameed, Jakub Kicinski, Parav Pandit, Vu Pham,
	netdev, linux-rdma

On Wed, Feb 10, 2021 at 07:54:17AM +0000, Wei Yongjun wrote:
> 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>
> ---
>  .../net/ethernet/mellanox/mlx5/core/sf/dev/driver.c  | 1 +
>  1 file changed, 1 insertion(+)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net/mlx5: SF, Fix error return code in mlx5_sf_dev_probe()
  2021-02-10  8:03 ` Leon Romanovsky
@ 2021-02-11  4:17   ` Saeed Mahameed
  0 siblings, 0 replies; 3+ messages in thread
From: Saeed Mahameed @ 2021-02-11  4:17 UTC (permalink / raw)
  To: Leon Romanovsky, Wei Yongjun
  Cc: Hulk Robot, Jakub Kicinski, Parav Pandit, Vu Pham, netdev,
	linux-rdma

On Wed, 2021-02-10 at 10:03 +0200, Leon Romanovsky wrote:
> On Wed, Feb 10, 2021 at 07:54:17AM +0000, Wei Yongjun wrote:
> > 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>
> > ---
> >  .../net/ethernet/mellanox/mlx5/core/sf/dev/driver.c  | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> 
> Thanks,
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

Applied to net-next-mlx5,
Thanks!



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-11  4:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-10  7:54 [PATCH net-next] net/mlx5: SF, Fix error return code in mlx5_sf_dev_probe() Wei Yongjun
2021-02-10  8:03 ` Leon Romanovsky
2021-02-11  4:17   ` Saeed Mahameed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).