Thread (27 messages) 27 messages, 3 authors, 2021-09-09
STALE1737d LANDED: 2 (1M)

[PATCH for-next 1/4] RDMA/efa: Free IRQ vectors on error flow

From: Gal Pressman <hidden>
Date: 2021-08-11 15:12:50
Subsystem: amazon rdma efa driver, infiniband subsystem, the rest · Maintainers: Michael Margolin, Jason Gunthorpe, Leon Romanovsky, Linus Torvalds

Make sure to free the IRQ vectors in case the allocation doesn't return
the expected number of IRQs.

Fixes: b7f5e880f377 ("RDMA/efa: Add the efa module")
Reviewed-by: Firas JahJah <redacted>
Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
Signed-off-by: Gal Pressman <redacted>
---
 drivers/infiniband/hw/efa/efa_main.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/efa/efa_main.c b/drivers/infiniband/hw/efa/efa_main.c
index 997947d77de6..42f9ac3f586e 100644
--- a/drivers/infiniband/hw/efa/efa_main.c
+++ b/drivers/infiniband/hw/efa/efa_main.c
@@ -358,6 +358,7 @@ static int efa_enable_msix(struct efa_dev *dev)
 	}
 
 	if (irq_num != msix_vecs) {
+		efa_disable_msix(dev);
 		dev_err(&dev->pdev->dev,
 			"Allocated %d MSI-X (out of %d requested)\n",
 			irq_num, msix_vecs);
-- 
2.32.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help