Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3527727pxj; Mon, 24 May 2021 08:42:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJYraD9HCRrGVhqc+XMms4rqWxsArIb0IzYssoqVbErVBC1wZFeHubTOE55CMNUD9YcjsU X-Received: by 2002:a17:907:c01:: with SMTP id ga1mr4725510ejc.80.1621870938348; Mon, 24 May 2021 08:42:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621870938; cv=none; d=google.com; s=arc-20160816; b=HRpjXpCsMbTiFxt/5mPuSOT+Uc9wUQf3g+0pDd07+UKkOaE+rwuVaPEU64LhSoHjrV TZL4WYRAbzN5rXx6NCwMh/yv05F/noKM0GTr1zuSM6q0BJtUuj2BV+lzCKePtCd+U9F9 L4og0pWIioqpDAwAJQS24HKqun9dc+t5pif6zy77orOOCmhBOaX/1bqyhWj0ZT0L8XwD LmB/qiIpxq3F/3HZBHGp+ax6SrsJ7bf/bQ2t+q/tx0+fp+zN+pzQxuXEOODI8vc2Zqcj XjCxTxJ0HZjqc0H89cXqITunnICCcugsvWaKRRAfBP9BMVHIm3C9WIQAVFNLn0SIoauP JGqg== 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=xQJLwARDd/oLCbzfpoWAKP94zlv/xu1xLP6TH0LlHT4=; b=TH4axWTaYqD1e15Cg/oyKj+BftF3Mfs0yS7FmyJIcFga4VnZF374UVTl/NnFGG1qWZ iYWOIfZ7p8JnDQ68Qe7XtlCv2grwHjaxUWmry4wlXYmGA7GcZgdPIGR1O2bXbTqjzaes CQ19+7XMUD5j3gD3eOT+pIjMCW2T2hnvC+l5DDLJp1O+8BCEVPcafdQig1VLM9HT8//s APMySL82ThSMs6RXrnsMfkp8KsZRa+/yj2WuT4Wk6yXe2NyPrxUu5bCeoeu5Y2F7ibQ5 Cog+5rIpTJ9AgdvpEM4WBA0bgkf3JNbMGN9M36ulcmSziPnlJJNorINZYZCKbT9RY0Jq k/ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iozSkTwx; 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=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 e20si12495307eds.560.2021.05.24.08.41.56; Mon, 24 May 2021 08:42:18 -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=@linuxfoundation.org header.s=korg header.b=iozSkTwx; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233042AbhEXPkU (ORCPT + 99 others); Mon, 24 May 2021 11:40:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:50532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234000AbhEXPg7 (ORCPT ); Mon, 24 May 2021 11:36:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BE7A961132; Mon, 24 May 2021 15:33:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870388; bh=g//2zAzgU47EP/+ANJ3eRiack64Vlh2dUKvGyvS7ges=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iozSkTwxexHcyFrzIrzBXJ/1Og4Rh5z271NQzqY77rxLLg3EjJmlAlBgyhTSIg3dj GT4Ovug6qct//s68P+5K9nVQj0gOooHAcH/kAw7pisprnatRpLYerlFt2adI2L3EI/ fFNCl6QI3iobO61CCv3KnLbtrxkq6PQucZ818tqs= 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.14 03/37] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() Date: Mon, 24 May 2021 17:25:07 +0200 Message-Id: <20210524152324.311595363@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152324.199089755@linuxfoundation.org> References: <20210524152324.199089755@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: 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(-) diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index a5b8313cf491..83cfbaa7f2fd 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); -- 2.30.2