aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGal Pressman <[email protected]>2021-08-11 18:11:28 +0300
committerJason Gunthorpe <[email protected]>2021-08-20 15:27:47 -0300
commitdbe986bdfd6dfe6ef24b833767fff4151e024357 (patch)
treea3523e7cbb4bffe5d25e1caca38ff8e0c550a536
parent65a81b61d8c5e96748671824cc46339afbd831d0 (diff)
RDMA/efa: Free IRQ vectors on error flow
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") Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Firas JahJah <[email protected]> Reviewed-by: Yossi Leybovich <[email protected]> Signed-off-by: Gal Pressman <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
-rw-r--r--drivers/infiniband/hw/efa/efa_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/efa/efa_main.c b/drivers/infiniband/hw/efa/efa_main.c
index 203e6ddcacbc..be4a07bd268a 100644
--- a/drivers/infiniband/hw/efa/efa_main.c
+++ b/drivers/infiniband/hw/efa/efa_main.c
@@ -357,6 +357,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);