From patchwork Mon May 24 15:25:29 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: 446463 Delivered-To: patch@linaro.org Received: by 2002:a17:907:2b0d:0:0:0:0 with SMTP id gc13csp3789467ejc; Mon, 24 May 2021 08:57:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGbgADc9MfErwftlRfeWvRCblQrPI/CscvYANJqWIJDwcfJihFJT7pYDTy7XILTRoruF4p X-Received: by 2002:a05:6e02:1b83:: with SMTP id h3mr14006438ili.199.1621871855515; Mon, 24 May 2021 08:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621871855; cv=none; d=google.com; s=arc-20160816; b=lcgL/3YOeo7q7rqP4f6HNsDkgDR7Xi+mY7g+NSUGJujt4wmPXv8NNXgFQBxQEQMnIO Omt92ktcjxseryqWseP8OX1sB/5sEEwPG4BNQApXLi+/QN89/Lks2KMzBXx117f6UY/Y 6fX0Mc2A3YASJswHjuHx7D4cANkLhMG2pBeFVe/10SdiL2qDHxB6ySjgJobrafb7a1hD o8D+qvIa1oEe8oN3illiT+ziG6r0nqlJZq4qUqCXpA3y9aV8TvPI2wUjVX6EMFm5OKgY zFoOZ5J6MqlZkfAfTgb3IIn7KVG6xwVKK4e5KZoJJLcWzWSWaG0LyJxp5tT7TwnzzuDE DaBg== 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=dBePHLKvhjKoF+ZPdoKZcuyIl0XPdJkqLlBXGd4ZRGM=; b=xqO/QGGpduGsKhFK9wIk3auOgmkIeX4twpJHY/RRpZra4gNbdxCJdsnAy5oKzdNbSj EPivhwiAqgHcapKyKzFOBtx2oDKkhQt26SCbbv4SKKODSBu3MD5st4PhRTocTX92v3d2 quw6NCoU60UeIxYO5FsEAWQrlUbk1mv6b5BWtWXziOEjJDzo0eAHM98EL2e3SYXxjrFj 35F+p+/8bpFtzMNTbrFdCaPMG9ALqJgNaesiHwZ3rrCyT5JYIv29MSw0XLoQls1//SC4 QHfVTwyL2xAmnH9tNFPw044zU7QkHPVk5npkObreW7CNPq5DwNPIITHPWOFhO3j6MR3M Tcqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YTyXTemC; 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 i17si13256443ioi.33.2021.05.24.08.57.35; Mon, 24 May 2021 08:57:35 -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=YTyXTemC; 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 S234720AbhEXP65 (ORCPT + 12 others); Mon, 24 May 2021 11:58:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:41136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235485AbhEXP6J (ORCPT ); Mon, 24 May 2021 11:58:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD6D061965; Mon, 24 May 2021 15:44:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621871042; bh=tLit2fks7rXXXfgitzjpcmmAtQRcj2PjNJMhFUkd6tk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YTyXTemCURanICd3XqwzeKq3q+0aE11NJwh84fls6R3N4zr6lvP+BxRud671bJkLF aAZIZgbKBG+sJC4z7qxlDTyGZpUWoCGIWviqRhzKXWA3hPgFd1QbI31EbWlgjbdFvR UdB4x8glORcyjw1s5T+GZLC06NntIdhfxnOuMuwU= 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.12 012/127] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() Date: Mon, 24 May 2021 17:25:29 +0200 Message-Id: <20210524152335.270424557@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152334.857620285@linuxfoundation.org> References: <20210524152334.857620285@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 0677295957bc..615e44af1ca6 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c @@ -1063,7 +1063,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);