Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754603AbaBDLVf (ORCPT ); Tue, 4 Feb 2014 06:21:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:24091 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753752AbaBDLPf (ORCPT ); Tue, 4 Feb 2014 06:15:35 -0500 From: Alexander Gordeev To: linux-kernel@vger.kernel.org Cc: Alexander Gordeev , Anil Gurumurthy , Vijaya Mohan Guvva , linux-scsi@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH 03/22] bfa: Cleanup bfad_setup_intr() Date: Tue, 4 Feb 2014 12:16:49 +0100 Message-Id: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Alexander Gordeev Cc: Anil Gurumurthy Cc: Vijaya Mohan Guvva Cc: linux-scsi@vger.kernel.org Cc: linux-pci@vger.kernel.org --- drivers/scsi/bfa/bfad.c | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 9b3e407..cd318f1 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c @@ -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 -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/