From patchwork Mon May 24 15:25:15 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: 446456 Delivered-To: patch@linaro.org Received: by 2002:a17:907:2b0d:0:0:0:0 with SMTP id gc13csp3777575ejc; Mon, 24 May 2021 08:41:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXUlaeF1bf398Ie+j4eO2hRJfdcFwjTntGi7jq2jSpWgalZK6REkF7wBo+SGK4h64OY2yM X-Received: by 2002:a05:6638:d09:: with SMTP id q9mr24880012jaj.32.1621870908630; Mon, 24 May 2021 08:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621870908; cv=none; d=google.com; s=arc-20160816; b=BsxGRlmTji3yTDQPvpOHJr56vLWNUYl/AW+Lli4hqyOtwaFKz+CLeePSMA35U6rWAx 7z8zF/tCk5aP6WK/99Gx6HIQPmbJYC3GYoIJxjl16OzoYYM7i0C6tDLlaHImfzGB42K+ DMSeyHRIyUtcnoAfthCtcWH4XXNxNf1jKeOoTAeznSzkZdSOh583ksNXTUEEhk8HOyky NA00kU8n4MWB+qkgWmoI9H9RicFX5AiC4lwrLBXkrDy7Hfa1ec2Dq3xSxw8UEACmql/N dyTtH67GtuTK6nXJ/33lCusLIOI9rHOcXwvOY4N8VmNVDR0gt1F3DL1NJiIjWKC2Mj5A UOUA== 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=3Kvf3Obwp0GpYIeu6cUNpyLmnhMWJQ2cAbw85c22EJM=; b=dEPJk2iPEds8+MGKvweHkjpRDdFNhOLt5vbI39yqXuETROd9ngI07mZDYOWcN948kM Ep0QAcMPmR5ctzKYhUEywkuZBk2bum+IPcs/1CgEb7kiNSyt3iFynrCg/jBgTgbGjABB gyDgNF94XMUFRdi8cti6LnTmtb1mwzcroPDPSA7gGImVOfp92zMcV/mN5/XN6UAbuLUN M8mNmB/C5qpeeDFNy/+7weyNrj94Y5MtOCmRejqd/GIkMPSP/QL+5+fVqApa4USc84Qf DrflYbUJ2/SX4vS6EMx0glyQ1nOP3jUg4svYBPeiLePplFkMU6vmnpP0D8AETH02LQfy gNxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SkHRD2Fl; 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 w31si12227021jal.77.2021.05.24.08.41.48; Mon, 24 May 2021 08:41:48 -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=SkHRD2Fl; 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 S233430AbhEXPnN (ORCPT + 12 others); Mon, 24 May 2021 11:43:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:56946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233759AbhEXPlD (ORCPT ); Mon, 24 May 2021 11:41:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4611761447; Mon, 24 May 2021 15:34:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870477; bh=sSVrUpd8vfMePinF/nqk40JVEeWxY/Dw/HFksC8EMiA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SkHRD2FlLvh6X+6v6cZmWAPwBXBJqY+Bj1/jeaBAGV4f8C52eoPqOHIaHHs3b8Y1G hA5DKUIGf0Wy/FjvK0n7lyzTrBtrKk3IdXBpp56mNZEDGhNUiI/NrCG1CosOFsKhYZ 6uzfkVc8NM4x8nz7ZDXJZyG6TDJ74owOseciBMcM= 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 4.19 04/49] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() Date: Mon, 24 May 2021 17:25:15 +0200 Message-Id: <20210524152324.525872576@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152324.382084875@linuxfoundation.org> References: <20210524152324.382084875@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 3007eecfa509..7451355f20e0 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c @@ -1107,7 +1107,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);