Commit 8cb7f63d authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Christoph Hellwig

bfa: Cleanup bfad_setup_intr() function

Signed-off-by: default avatarAlexander Gordeev <agordeev@redhat.com>
Acked-by: default avatarAnil Gurumurthy <anil.gurumurthy@qlogic.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent cd69a09e
...@@ -1219,7 +1219,7 @@ bfad_install_msix_handler(struct bfad_s *bfad) ...@@ -1219,7 +1219,7 @@ bfad_install_msix_handler(struct bfad_s *bfad)
int int
bfad_setup_intr(struct bfad_s *bfad) bfad_setup_intr(struct bfad_s *bfad)
{ {
int error = 0; int error;
u32 mask = 0, i, num_bit = 0, max_bit = 0; u32 mask = 0, i, num_bit = 0, max_bit = 0;
struct msix_entry msix_entries[MAX_MSIX_ENTRY]; struct msix_entry msix_entries[MAX_MSIX_ENTRY];
struct pci_dev *pdev = bfad->pcidev; struct pci_dev *pdev = bfad->pcidev;
...@@ -1279,20 +1279,18 @@ bfad_setup_intr(struct bfad_s *bfad) ...@@ -1279,20 +1279,18 @@ bfad_setup_intr(struct bfad_s *bfad)
bfad->bfad_flags |= BFAD_MSIX_ON; bfad->bfad_flags |= BFAD_MSIX_ON;
return error; return 0;
} }
line_based: line_based:
error = 0; error = request_irq(bfad->pcidev->irq, (irq_handler_t)bfad_intx,
if (request_irq BFAD_IRQ_FLAGS, BFAD_DRIVER_NAME, bfad);
(bfad->pcidev->irq, (irq_handler_t) bfad_intx, BFAD_IRQ_FLAGS, if (error)
BFAD_DRIVER_NAME, bfad) != 0) { return error;
/* Enable interrupt handler failed */
return 1;
}
bfad->bfad_flags |= BFAD_INTX_ON; bfad->bfad_flags |= BFAD_INTX_ON;
return error; return 0;
} }
void void
......
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