diff options
author | Konstantin Taranov <kotaranov@microsoft.com> | 2024-04-23 16:15:51 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2024-04-23 17:02:44 +0200 |
commit | f88320b698ad099a2f742adfb9f87177bfffe0c5 (patch) | |
tree | 1a7047be6ace44e42bda6bd4e7199965ac351741 /drivers/infiniband | |
parent | IB/mlx5: Use __iowrite64_copy() for write combining stores (diff) | |
download | linux-f88320b698ad099a2f742adfb9f87177bfffe0c5.tar.xz linux-f88320b698ad099a2f742adfb9f87177bfffe0c5.zip |
RDMA/mana_ib: Fix missing ret value
Set ret to -ENODEV when netdev_master_upper_dev_get_rcu returns NULL.
Fixes: 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")
Link: https://lore.kernel.org/r/1713881751-21621-1-git-send-email-kotaranov@linux.microsoft.com
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mana/device.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mana/device.c b/drivers/infiniband/hw/mana/device.c index fca4d0d85c64..7e09ceb3da53 100644 --- a/drivers/infiniband/hw/mana/device.c +++ b/drivers/infiniband/hw/mana/device.c @@ -87,6 +87,7 @@ static int mana_ib_probe(struct auxiliary_device *adev, upper_ndev = netdev_master_upper_dev_get_rcu(mc->ports[0]); if (!upper_ndev) { rcu_read_unlock(); + ret = -ENODEV; ibdev_err(&dev->ib_dev, "Failed to get master netdev"); goto free_ib_device; } |