[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1713881751-21621-1-git-send-email-kotaranov@linux.microsoft.com>
Date: Tue, 23 Apr 2024 07:15:51 -0700
From: Konstantin Taranov <kotaranov@...ux.microsoft.com>
To: nathan@...nel.org,
kotaranov@...rosoft.com,
sharmaajay@...rosoft.com,
longli@...rosoft.com,
jgg@...pe.ca,
leon@...nel.org
Cc: linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH rdma-next 1/1] RDMA/mana_ib: fix missing ret value
From: Konstantin Taranov <kotaranov@...rosoft.com>
Set ret to -ENODEV when netdev_master_upper_dev_get_rcu
returns NULL.
Fixes: 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")
Signed-off-by: Konstantin Taranov <kotaranov@...rosoft.com>
---
drivers/infiniband/hw/mana/device.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.43.0
Powered by blists - more mailing lists