From patchwork Mon May 24 15:25:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 446457 Delivered-To: patch@linaro.org Received: by 2002:a17:907:2b0d:0:0:0:0 with SMTP id gc13csp3781499ejc; Mon, 24 May 2021 08:47:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvuZwbNtldIcxHp8IPt+mdDVmHOUPgdJ6cXb3uqXqjSw+bwgj08Q8cAyv/THNe8SKzRbXp X-Received: by 2002:a05:6602:242b:: with SMTP id g11mr14894521iob.105.1621871227598; Mon, 24 May 2021 08:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621871227; cv=none; d=google.com; s=arc-20160816; b=V0bFYgC1LhfOBt4fpBrmXdDPv2RPMNAYGUZM4/ABUmZVBW2GpEty2yF0KCv44NjGTb Bq69mImc2+kEKAowxanv6r+cWiwY1rbWRUlPNyQpVwM4jHaP2FXPXwT6FIMtiIhIjv9U WDPIdWdYH1JlaURACi/uW+JVXkl+2jZAmdMOpZ8h+dYutQx3XVPKzaSZnGxDktizbJEZ qobxljXetLcXNVDmuGH7W6K8uMIwLjIQL0N5w12kK8U8/fCA4Zl9kWiiSgZP4MsR1vLH aR2eY5eZqrnoAMTRBmrkHDIa+JtqxD6fXIMze/KYVEqqIRmNjlAwethhJKGlBEYRnAGS n1gA== 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=sSURbU32RqzOLffQPDT/ffsPgFvWeueB11rSLBQoYSg=; b=BS/0h9axEbZOT+adTYLJAqzcjGKA9lGbcj2d+Zlxh4OBj/TyGZGqqElGrLA7bFNFoe IzQbTS0SE8XdazKUvk1RmuUSpxSrL2unx+VTcv9vhS19S6c+KL94cSIBgywz8lafpl42 15Lz7X6KM765BPBWH/fWDBANBTu3Y0VjSqP2SP47smvgTtYRPx26oqCz2bCY+xTyE5e2 P9jgBDmHAzpXAzptpMopNArUifXVr6UTjTerX8oaaPOWJqQCw7XSa6Anxifoycoc6BA5 qK9zYBQFHsTy42lSPPazK4VUHhdYezZgUy9AhD04GsvRiXEPxYDErwFN2auJu6yIwXVM KWWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FWLRQ0YM; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (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 v6si15130532jas.16.2021.05.24.08.47.07; Mon, 24 May 2021 08:47:07 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=FWLRQ0YM; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233298AbhEXPsd (ORCPT + 12 others); Mon, 24 May 2021 11:48:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:33952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234141AbhEXPqa (ORCPT ); Mon, 24 May 2021 11:46:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2FA0A61480; Mon, 24 May 2021 15:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870610; bh=ygiuHxg9vCCzqyxiwByGyk+UO4v5+YH2UpUoEb3vkBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FWLRQ0YMYuidNCTHzwtt3so+h9YKnxVrYu7soZBQoY7VBjFJPrG8z1zj0hmQdZZjT f3o92pr+BY8GSaX63SVPB0ty3tqo+Ix5V1w7/RUUc3zGtUnoOpJdH1Wtcqt35E1jKz Gd6DuJmbKfOLCgdE3PBLuT6Iws+GPPAQ38ju7rho= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Himanshu Madhani , Zhen Lei , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.4 07/71] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() Date: Mon, 24 May 2021 17:25:13 +0200 Message-Id: <20210524152326.699930491@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152326.447759938@linuxfoundation.org> References: <20210524152326.447759938@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit 5cb289bf2d7c34ca1abd794ce116c4f19185a1d4 ] Fix to return a negative error code from the error handling case instead of 0 as done elsewhere in this function. Link: https://lore.kernel.org/r/20210514090952.6715-1-thunder.leizhen@huawei.com Fixes: a9083016a531 ("[SCSI] qla2xxx: Add ISP82XX support.") Reported-by: Hulk Robot Reviewed-by: Himanshu Madhani Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qla2xxx/qla_nx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.30.2 diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index c855d013ba8a..de567a025133 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c @@ -1113,7 +1113,8 @@ qla82xx_write_flash_dword(struct qla_hw_data *ha, uint32_t flashaddr, return ret; } - if (qla82xx_flash_set_write_enable(ha)) + ret = qla82xx_flash_set_write_enable(ha); + if (ret < 0) goto done_write; qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_WDATA, data);