Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp182083pxx; Wed, 28 Oct 2020 01:55:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgEloJenNutHbH1i+FwheFoMwNTep67Fu7jzsv5aCNa0Ey0tXiUD695InHKJHSKnJg1Ke8 X-Received: by 2002:a05:6402:a45:: with SMTP id bt5mr6785052edb.101.1603875349678; Wed, 28 Oct 2020 01:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603875349; cv=none; d=google.com; s=arc-20160816; b=GrBu+TyKw0XzCn3eqAmp/eJzvvym0X6djpgcvD69Frcgd9+VsV69G2T47yviquAvX4 pm97T6u9PUo3TFnQ8kTP9cGZOHDCnGXjXy/DezQOc1/44lyloVPz8kKzJPJqrhOGyeD3 ZRGieg3ueg4ZY4/qFGOf23YNAJ3AVGtALHVTQ6h6LOZ1Cp2usn2vMk0ylhXnBKu+0kj9 PM6T3ndqu1bNWGjTOlrtN3Jf4BBlB0lGEggp+SQMG/cTvlLg6/dGCyvMfs2MbTE7CLkH bmNMOQQC2LB+EB4QiGaFfvi7KB1yVEOoFtF1IWyn23Nug5zegq4ARmTbXjQa1jDZIsyP loZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NulbW5P5XVNkd+3ZzioRB76AGY6iLdxjAEUFCLTHvdo=; b=dVBx4sceljW6vgUrmAFpS57DclUMaF86hP2OXEMHWsaKSTNMpDLuNBTYyPxVXlcJvw 1JBLv45gjarDMbpxoOkOmGB/av965EslfKgt6IZxfmlNTiutKMyXuQ6jafd3qJoqZ1lC rumhGJ8lP/7Huwek9RIk/1hlvQJp1CLLCUMh4ddZNAjEHlcZsICylBrIpMFra1xyMXIf lfPD4xcQTBX8KEF4NZN505vbEtt6kNZr3LSVrskjSEUcy1f+BJtaOym+hl05MUfopHW9 YBssac4XuQQtNfje2APGSv7V8bBRLXi/bokU7OxP9ncSpSSgQWmPVy8RUXgy0RDWLL9q wkHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tlswwV5K; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si2719069ejq.533.2020.10.28.01.55.27; Wed, 28 Oct 2020 01:55:49 -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; dkim=pass header.i=@kernel.org header.s=default header.b=tlswwV5K; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756553AbgJ0OOI (ORCPT + 99 others); Tue, 27 Oct 2020 10:14:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:59262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755508AbgJ0OKQ (ORCPT ); Tue, 27 Oct 2020 10:10:16 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8F7E9218AC; Tue, 27 Oct 2020 14:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807816; bh=FIYVyOL5qvRsAELMrA3j4pSEEqu8kK6dC8IE2kZ6MDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tlswwV5KtOP8g8uyCOB5vmtq0tc063aN25CrlROtk/U8F2EPjiX2Uv2XMTQYmnk/M DR4bliesl9hTn65fV9VLiAgAVXqZHUbjqIMtBmgauQKPL6TWc+zVFe+mveAcJjHGhE lJCseT500EXh5yqzAOJ1u8PkCrx/tOtyXn0iAqNs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Praveen Madhavan , Tianjia Zhang , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.14 052/191] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw() Date: Tue, 27 Oct 2020 14:48:27 +0100 Message-Id: <20201027134912.234903242@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tianjia Zhang [ Upstream commit 44f4daf8678ae5f08c93bbe70792f90cd88e4649 ] On an error exit path, a negative error code should be returned instead of a positive return value. Link: https://lore.kernel.org/r/20200802111531.5065-1-tianjia.zhang@linux.alibaba.com Fixes: f40e74ffa3de ("csiostor:firmware upgrade fix") Cc: Praveen Madhavan Signed-off-by: Tianjia Zhang Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- 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 ab30db8c36c6f..bbcba3d08d495 100644 --- a/drivers/scsi/csiostor/csio_hw.c +++ b/drivers/scsi/csiostor/csio_hw.c @@ -1997,7 +1997,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.25.1