Commit c833ac1a authored by Oded Gabbay's avatar Oded Gabbay

habanalabs/gaudi2: free event irq if init fails

In case initialization fails after event irq was requested, we need to
release that irq.
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 76925f55
...@@ -3581,7 +3581,7 @@ static int gaudi2_enable_msix(struct hl_device *hdev) ...@@ -3581,7 +3581,7 @@ static int gaudi2_enable_msix(struct hl_device *hdev)
rc = gaudi2_dec_enable_msix(hdev); rc = gaudi2_dec_enable_msix(hdev);
if (rc) { if (rc) {
dev_err(hdev->dev, "Failed to enable decoder IRQ"); dev_err(hdev->dev, "Failed to enable decoder IRQ");
goto free_completion_irq; goto free_event_irq;
} }
for (i = GAUDI2_IRQ_NUM_USER_FIRST, j = prop->user_dec_intr_count, user_irq_init_cnt = 0; for (i = GAUDI2_IRQ_NUM_USER_FIRST, j = prop->user_dec_intr_count, user_irq_init_cnt = 0;
...@@ -3612,6 +3612,10 @@ static int gaudi2_enable_msix(struct hl_device *hdev) ...@@ -3612,6 +3612,10 @@ static int gaudi2_enable_msix(struct hl_device *hdev)
gaudi2_dec_disable_msix(hdev, GAUDI2_IRQ_NUM_SHARED_DEC1_ABNRM + 1); gaudi2_dec_disable_msix(hdev, GAUDI2_IRQ_NUM_SHARED_DEC1_ABNRM + 1);
free_event_irq:
irq = pci_irq_vector(hdev->pdev, GAUDI2_IRQ_NUM_EVENT_QUEUE);
free_irq(irq, cq);
free_completion_irq: free_completion_irq:
irq = pci_irq_vector(hdev->pdev, GAUDI2_IRQ_NUM_COMPLETION); irq = pci_irq_vector(hdev->pdev, GAUDI2_IRQ_NUM_COMPLETION);
free_irq(irq, cq); free_irq(irq, cq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment