Skip to content

Commit

Permalink
RDMA/efa: Free IRQ vectors on error flow
Browse files Browse the repository at this point in the history
[ Upstream commit dbe986b ]

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

Fixes: b7f5e88 ("RDMA/efa: Add the efa module")
Link: https://lore.kernel.org/r/20210811151131.39138-2-galpress@amazon.com
Reviewed-by: Firas JahJah <firasj@amazon.com>
Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
gal-pressman authored and gregkh committed Sep 3, 2021
1 parent 50092de commit 4c00ae6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/hw/efa/efa_main.c
Expand Up @@ -356,6 +356,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);
Expand Down

0 comments on commit 4c00ae6

Please sign in to comment.