bfa: Cleanup bfad_setup_intr() function
authorAlexander Gordeev <agordeev@redhat.com>
Wed, 16 Jul 2014 18:05:07 +0000 (20:05 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 29 Jul 2014 12:38:52 +0000 (08:38 -0400)
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/bfa/bfad.c

index bb931808328f07c0473c91ae418c10cec560c68a..c18279fbb8b39ad76432a9647f6d27b94d526109 100644 (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
This page took 0.026974 seconds and 5 git commands to generate.