Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH] RDMA/mana_ib: Ensure variable err is initialized
@ 2025-02-21 19:39 Kees Bakker
  2025-02-21 20:34 ` [EXTERNAL] " Long Li
  2025-02-23 11:28 ` Leon Romanovsky
  0 siblings, 2 replies; 4+ messages in thread
From: Kees Bakker @ 2025-02-21 19:39 UTC (permalink / raw)
  To: Long Li, Konstantin Taranov, Jason Gunthorpe, Leon Romanovsky
  Cc: linux-rdma, linux-kernel

In the function mana_ib_gd_create_dma_region if there are no dma blocks
to process the variable `err` remains uninitialized.

Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
Signed-off-by: Kees Bakker <kees@ijzerbout.nl>
---
 drivers/infiniband/hw/mana/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mana/main.c b/drivers/infiniband/hw/mana/main.c
index 114ca8c509ce..eda9c5b971de 100644
--- a/drivers/infiniband/hw/mana/main.c
+++ b/drivers/infiniband/hw/mana/main.c
@@ -384,7 +384,7 @@ static int mana_ib_gd_create_dma_region(struct mana_ib_dev *dev, struct ib_umem
 	unsigned int tail = 0;
 	u64 *page_addr_list;
 	void *request_buf;
-	int err;
+	int err = 0;
 
 	gc = mdev_to_gc(dev);
 	hwc = gc->hwc.driver_data;
-- 
2.48.1


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

end of thread, other threads:[~2025-02-23 11:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-21 19:39 [PATCH] RDMA/mana_ib: Ensure variable err is initialized Kees Bakker
2025-02-21 20:34 ` [EXTERNAL] " Long Li
2025-02-23 11:28   ` Leon Romanovsky
2025-02-23 11:28 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox