Skip to content

Commit

Permalink
bfa: Cleanup bfad_setup_intr() function
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Alexander Gordeev authored and Christoph Hellwig committed Jul 29, 2014
1 parent cd69a09 commit 8cb7f63
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions drivers/scsi/bfa/bfad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8cb7f63

Please sign in to comment.