Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp163121pxx; Wed, 28 Oct 2020 01:13:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ7ikaaxYQ7htom1tKeHzYcqgQ6k9GX3PBLOp/uWMACAjoLW7XfceVavrjxYczJWUfMiWb X-Received: by 2002:a17:906:34d1:: with SMTP id h17mr6228157ejb.87.1603872805603; Wed, 28 Oct 2020 01:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603872805; cv=none; d=google.com; s=arc-20160816; b=j4Fyb6Z1QL4ipCMqgvlGAAUOuPnLbqrmWC7VYejQm+FJX2U1begDre4V4uxRoCEZj4 DctHbROKqetoFiayUeME34TcE2rdz+IcwVngqepGq4+QIWtgPyUmQ+pjm9y3P7PKhDPG v8783nQGMVtzYfTVLwkXHyBr1GA/6kZqG2sNHPAW+nPlZrkJfGkm2+msVIF0pt9189uf neHJW5PW1j2x5MFzHlPuEdtv5z10vSTv7zaSYSHk8n2CLVuS1oQfszQSqUvdilHwHU8A lFGSR1N1g2W0FIHwKh5qYOO34/wtTbBZ1IRCRBscj54nG2GANAGAarP0Pn4XC3bk8VU9 F9Qg== 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=Gl6mEmsRETXsLPKSssNITMY7pJ3am3qh1Hi7LUZJ1Fw=; b=WmakAL8guKeGFqxOSrkf/1VqViPOSMTvGMdnm5MkWRCQMe6iMG+r5SL+PhnSIj3UrF 7/LgGW1oFt/N3T5RgHI4VAm8Pg0lXidiOf2CeHoKV5tZkt9NTLfx9Y09W3RqO60sPHt4 jLw2I0prtZNS9IZt8Db3xmpWmJMJs2i2lTAO0IJbHuFkzFCXn7dwHbTyA1O7UNUefcS7 JQq1rbcfCdg/acjhGVd03AOTo6BW0Hfhjfrk7mBGjyoDcQ3gDO2rZBYwZUog1E7pyaiK oyvHFiPGztbPpLGodJ9ri0Wq2qD/08NYIHNkKWq5sSI+SdxZSkUueOJV88cbjOCaKqqe 1E0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ZRv/Ygeq"; 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 y9si2654785ede.591.2020.10.28.01.13.03; Wed, 28 Oct 2020 01:13:25 -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="ZRv/Ygeq"; 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 S1734462AbgJ0N7Z (ORCPT + 99 others); Tue, 27 Oct 2020 09:59:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:46790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753239AbgJ0N7T (ORCPT ); Tue, 27 Oct 2020 09:59:19 -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 56BDB218AC; Tue, 27 Oct 2020 13:59:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807157; bh=3TadBh0ChBLdE/OoitLzKEq7k8MBSDGCCFHdu6BOMfU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZRv/YgeqJ2f3WNbRgDXuun1WNuZZXOe2YG+yEMCGLKzmRCPnW0vnrxfCftZfKoSa7 xE1qotfkYE5cKbgRjtXi9/HxJQP84vLyPYql46qE5oHUFVg+aYG9Sp9csEgd5Kv010 di76iKJbd9VHJMvIissfxzGVj1vowhwjsln0ENCM= 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.4 033/112] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw() Date: Tue, 27 Oct 2020 14:49:03 +0100 Message-Id: <20201027134902.125418743@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134900.532249571@linuxfoundation.org> References: <20201027134900.532249571@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 dab195f04da78..06ca0495f3e8e 100644 --- a/drivers/scsi/csiostor/csio_hw.c +++ b/drivers/scsi/csiostor/csio_hw.c @@ -1973,7 +1973,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