Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1110890pxx; Tue, 27 Oct 2020 08:29:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUfPtnuRrOUTVUKjPEoANl0VIVyAqYRBRedbVu0Gn0rZTzwWc6IjpOQJRZ2+5uFfuowbBb X-Received: by 2002:a17:907:20b2:: with SMTP id pw18mr2831594ejb.159.1603812564280; Tue, 27 Oct 2020 08:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603812564; cv=none; d=google.com; s=arc-20160816; b=NZT9QX55FKlrgjfQvFWDanGE/gAw33XAMDBUtZgrHPW0scmDkhERDW64OhA6cZ/caF kOa2A0a+CMii6o1skFbTrtsR+9Cz+6a7nugV2cMkVw45Fvl90nLhpVj2KsbkA7eeYOOo idsMH844AAcNfzK3dqomrALh/PCRk0f/ptJwo1l3+bTNlszSdwwIRCXgjuXkVvbnMwyq a7Nj5bw/o4yyipAgUmOWLBHYlTODA3ZMMWJoC0o0dj7pzA+VQuMoc/qvTGuB5JN4Dxeg Fioy57inuKDQgilFgBnfqxNxWhLROGwy5+oNC6j+7AcSifpjesbkP+PiehxMgpYAT0B8 5YPA== 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=mdTphFkZVnLX071sdwVS+RMWZ2mvrWs/n94p+lW5FEc=; b=H4+69rKgu/gKN4BwrfiylI+UlH/qUziyKbMMOx1Q4DjMAUgpRKDrHcTQsQ/dFQZYys ol2KeuHzJdTOJoJ6SWL2qOTHSo0r/9dXrnLHX1MbmXhkxlMJ8/1aBzAFAoNKQ7qQjCsx JiItCI/6tspHUBWxoBTpMkOyv6zVMeEQwKvxXQuPpZ1/4hQm/8VppRIQhTunUvVwCuQv BOmt28pHpPYEFs3u/dS3loSIhXYPckD6tkFQB/1koouuk+rOcF5FGSm9y1VHhVHKvdPp tmAdAYOTfiUBJv19NqlfgBD2Pb60EdzwAXf3nkbzaLxc9HxT5cmVVUhJ0i6hyvTx1HYD Ki1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IG1a01Ot; 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 f18si1160997edw.436.2020.10.27.08.28.59; Tue, 27 Oct 2020 08:29:24 -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=IG1a01Ot; 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 S1760705AbgJ0OgA (ORCPT + 99 others); Tue, 27 Oct 2020 10:36:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:33910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760567AbgJ0OfN (ORCPT ); Tue, 27 Oct 2020 10:35:13 -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 0F1BA20709; Tue, 27 Oct 2020 14:35:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809312; bh=FN5dYjy+owldN5tlXjOVb1OYFx0gVwjUZM6Wq1r+HFI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IG1a01OtsLsj6Lz6XnJ9sRcbGphb8068nPAB4Z9SbrTyx3d5Wf1mvVj6xTr0pBdvH WWbkbnsRmEXx2oRs1l/9bacX0d9d6qT3hxr1IPCMneV96jtlwzg/ntOelh+K1Xa/kg Hf/qA9qepc9P0dGu3BYLGtlPVooKrFb181o9XFGk= 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 5.4 121/408] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw() Date: Tue, 27 Oct 2020 14:50:59 +0100 Message-Id: <20201027135500.723655311@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@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 e519238864758..1b6f9351b43f9 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.25.1