bfa: Cleanup bfad_setup_intr() function

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Alexander Gordeev 2014-07-16 20:05:07 +02:00 committed by Christoph Hellwig
parent cd69a09eb2
commit 8cb7f63d68

View file

@ -1219,7 +1219,7 @@ bfad_install_msix_handler(struct bfad_s *bfad)
int
bfad_setup_intr(struct bfad_s *bfad)
{
int error = 0;
int error;
u32 mask = 0, i, num_bit = 0, max_bit = 0;
struct msix_entry msix_entries[MAX_MSIX_ENTRY];
struct pci_dev *pdev = bfad->pcidev;
@ -1279,20 +1279,18 @@ bfad_setup_intr(struct bfad_s *bfad)
bfad->bfad_flags |= BFAD_MSIX_ON;
return error;
return 0;
}
line_based:
error = 0;
if (request_irq
(bfad->pcidev->irq, (irq_handler_t) bfad_intx, BFAD_IRQ_FLAGS,
BFAD_DRIVER_NAME, bfad) != 0) {
/* Enable interrupt handler failed */
return 1;
}
error = request_irq(bfad->pcidev->irq, (irq_handler_t)bfad_intx,
BFAD_IRQ_FLAGS, BFAD_DRIVER_NAME, bfad);
if (error)
return error;
bfad->bfad_flags |= BFAD_INTX_ON;
return error;
return 0;
}
void