Skip to content

Commit 8cb7f63

Browse files
Alexander GordeevChristoph Hellwig
authored andcommitted
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>
1 parent cd69a09 commit 8cb7f63

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

‎drivers/scsi/bfa/bfad.c‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ bfad_install_msix_handler(struct bfad_s *bfad)
12191219
int
12201220
bfad_setup_intr(struct bfad_s *bfad)
12211221
{
1222-
int error = 0;
1222+
int error;
12231223
u32 mask = 0, i, num_bit = 0, max_bit = 0;
12241224
struct msix_entry msix_entries[MAX_MSIX_ENTRY];
12251225
struct pci_dev *pdev = bfad->pcidev;
@@ -1279,20 +1279,18 @@ bfad_setup_intr(struct bfad_s *bfad)
12791279

12801280
bfad->bfad_flags |= BFAD_MSIX_ON;
12811281

1282-
return error;
1282+
return 0;
12831283
}
12841284

12851285
line_based:
1286-
error = 0;
1287-
if (request_irq
1288-
(bfad->pcidev->irq, (irq_handler_t) bfad_intx, BFAD_IRQ_FLAGS,
1289-
BFAD_DRIVER_NAME, bfad) != 0) {
1290-
/* Enable interrupt handler failed */
1291-
return 1;
1292-
}
1286+
error = request_irq(bfad->pcidev->irq, (irq_handler_t)bfad_intx,
1287+
BFAD_IRQ_FLAGS, BFAD_DRIVER_NAME, bfad);
1288+
if (error)
1289+
return error;
1290+
12931291
bfad->bfad_flags |= BFAD_INTX_ON;
12941292

1295-
return error;
1293+
return 0;
12961294
}
12971295

12981296
void

0 commit comments

Comments
 (0)