Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1338217pxa; Sun, 2 Aug 2020 04:16:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwihlHQ8KK7VpjqDJEI/2odg+V2A5XPxncXjVU3LZIpuMs4mkfL0xNB3NDzWLumqvJnfJrx X-Received: by 2002:a05:6402:1545:: with SMTP id p5mr11006598edx.388.1596366973246; Sun, 02 Aug 2020 04:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596366973; cv=none; d=google.com; s=arc-20160816; b=sCrpX7rtW3MJi88n6l4iZY8F33Gds/qQV/qAzEU7ady3TDBMMypIUTAygGuwkXoev2 NGKKc0wgbKAumYZNLmpFi29UZ5m7kQjH1azAMqmljThCXBB9VlE4bD82sGMqCBXCKIkW f4fWPRASSIN3wzwwO/vhEi2LccJq0ftO6CDFuQIUNBqy5rMAZ16ZcSGLNxj+C4l3E/vK Em1U9mcSxUj+0KteMqTZ7uOnyF14F779kT3d7ljEySb74I0ureBi/2Hl8DrSZOWTFjiq acLmCQxmmHuG4L/JOn41MdkFr0x6dv6MtEwPPlLI/+O6F3n9uNDbR2x4H79CA66ZELXh q01A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=359lyiBtWq/OdXx5aOxny0fViicv9N1SXtLrJDc7OcM=; b=EZb9oeySe2IOUD+t4RnVK7qkK56/TblW+ikQpRjNUuQuj9qQGJ3T1VhpE41ul6dreu lN/Lv0wCGbK0gA1c41dkmX188M+aNdRk7zAoUqkarEINPjRJ4eEleyLWbNCmg0DpqgEG yT9nHx1kU3jvGJrbXCmYswGtPQj4Oale4BCMuocjwGBC+FJBW6CLl5KlVx3UE0EXqMpC OxfSzOsWKbn9g47YC4GbOssmh0fqDBYg06InddIkfiltYAhPo1AN0BfWutd2Ai3UJPnQ nCcBWbibjnjX2oAKXWbe81dUc3WC+mCOlX69Qwi2JRGdmVZIRA6n6/jopYjin+uD6TQT HK8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si8093336ejc.547.2020.08.02.04.15.51; Sun, 02 Aug 2020 04:16:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728062AbgHBLPi (ORCPT + 99 others); Sun, 2 Aug 2020 07:15:38 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:35906 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728132AbgHBLPg (ORCPT ); Sun, 2 Aug 2020 07:15:36 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0U4TpvXJ_1596366931; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0U4TpvXJ_1596366931) by smtp.aliyun-inc.com(127.0.0.1); Sun, 02 Aug 2020 19:15:32 +0800 From: Tianjia Zhang To: jejb@linux.ibm.com, martin.petersen@oracle.com, tianjia.zhang@linux.alibaba.com, arkadiusz@drabczyk.org, praveenm@chelsio.com, davem@davemloft.net Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, tianjia.zhang@alibaba.com Subject: [PATCH] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw() Date: Sun, 2 Aug 2020 19:15:31 +0800 Message-Id: <20200802111531.5065-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On an error exit path, a negative error code should be returned instead of a positive return value. Fixes: f40e74ffa3de4 ("csiostor:firmware upgrade fix") Cc: Praveen Madhavan Signed-off-by: Tianjia Zhang --- drivers/scsi/csiostor/csio_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c index 950f9cdf0577..5d0f42031d12 100644 --- a/drivers/scsi/csiostor/csio_hw.c +++ b/drivers/scsi/csiostor/csio_hw.c @@ -2384,7 +2384,7 @@ static int csio_hw_prep_fw(struct csio_hw *hw, struct fw_info *fw_info, FW_HDR_FW_VER_MICRO_G(c), FW_HDR_FW_VER_BUILD_G(c), FW_HDR_FW_VER_MAJOR_G(k), FW_HDR_FW_VER_MINOR_G(k), FW_HDR_FW_VER_MICRO_G(k), FW_HDR_FW_VER_BUILD_G(k)); - ret = EINVAL; + ret = -EINVAL; goto bye; } -- 2.26.2