From patchwork Mon Feb 1 15:08:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maurizio Lombardi X-Patchwork-Id: 8180381 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A78CCBEEE5 for ; Mon, 1 Feb 2016 15:09:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DAEF92027D for ; Mon, 1 Feb 2016 15:09:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E6192022A for ; Mon, 1 Feb 2016 15:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933256AbcBAPIt (ORCPT ); Mon, 1 Feb 2016 10:08:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38527 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932962AbcBAPIs (ORCPT ); Mon, 1 Feb 2016 10:08:48 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id D826BC0C2340; Mon, 1 Feb 2016 15:08:47 +0000 (UTC) Received: from dhcp-26-129.brq.redhat.com (dhcp-26-129.brq.redhat.com [10.34.26.129]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u11F8jcn010431; Mon, 1 Feb 2016 10:08:46 -0500 From: Maurizio Lombardi To: QLogic-Storage-Upstream@qlogic.com Cc: JBottomley@odin.com, linux-scsi@vger.kernel.org, chad.dupuis@qlogic.com Subject: [PATCH] bnx2fc: bnx2fc_eh_abort(): fix wrong return code. Date: Mon, 1 Feb 2016 16:08:45 +0100 Message-Id: <1454339325-12579-1-git-send-email-mlombard@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the link is not ready, the bnx2fc_eh_abort() function should return FAILED. Signed-off-by: Maurizio Lombardi Reviewed-by: Ewan D. Milne Acked-by: Chad Dupuis --- drivers/scsi/bnx2fc/bnx2fc_io.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 0002caf..2230dab 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c @@ -1104,8 +1104,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd) struct bnx2fc_cmd *io_req; struct fc_lport *lport; struct bnx2fc_rport *tgt; - int rc = FAILED; - + int rc; rc = fc_block_scsi_eh(sc_cmd); if (rc) @@ -1114,7 +1113,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd) lport = shost_priv(sc_cmd->device->host); if ((lport->state != LPORT_ST_READY) || !(lport->link_up)) { printk(KERN_ERR PFX "eh_abort: link not ready\n"); - return rc; + return FAILED; } tgt = (struct bnx2fc_rport *)&rp[1];