Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3524091pxj; Mon, 24 May 2021 08:37:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2ud48/efayxJXtqdtuu6S4C/c5xkLpj/4oCZkLFFBTYtW4l7KfhOEIaWgiTCgBIoRHs9Q X-Received: by 2002:a17:907:9606:: with SMTP id gb6mr24528428ejc.399.1621870642662; Mon, 24 May 2021 08:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621870642; cv=none; d=google.com; s=arc-20160816; b=GuRDGYWF7f2qhhKIG7Nhf+NldjM3LdhJAzIbbZ3UfmYqDu7tNtc2/xv2VGNRSKA2ZR ZXy/FxAJQVWhgtRiKIv5WxILjkrESiTA1Cgk/f9gpX2oddxWce7GwcykdosVKUok04ND /xkRVJY7PfceXXk7JdwGjLvhJS0GIfMuNA6qww4msk1MWi0Ai1y0CsnMloAKbIlAiCma WdPmNmVn0dLP4DklYNMWNp6FUnZ0efoMSCiLRKEXnwZ0XIYi1OZOMyv94p/GWqamSBbZ pu88F+mx1kCludwW3aXmjuUzEB/KfgbdhGvAtDBYyzsODyTmD44m6V6s5cwcxrehQsEG zgLA== 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=1GBpd5Qg7XTcCHhGSczxW7RpXPlIB4JHFQCOB76x52Y=; b=aSCc/01nJH45IXiBOkfArDs+QlpP87NGPgLVIP8QWJD8orMyu5AOHl8liNDs+mw/Ga rxsZtT3nhIOnK4Tbpt/be+ulzAu31/lWyW7lbjgItLX/rYuwRRn5v8CJECJ0PCobyXDF iWuUHlLPIWoKcC69wg9nGZjJH+3+xHlViopDtTu+MBTxmQJQ4xiR4v148liF9DMaKm8T J+B24f1Resx+IltsT9i1ePK7ULgFsA5wlaC82qhEm71TlN0908Y9DmXuJ1SmGd9h/FE5 e+b/HqHVY+I3uBtbHEbH/IOlJprTtxYM8nCPYN+W9zamW09RAWSbCwax5TGRUdaP8H9n Uv2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n0zM92tl; 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 cz28si12841190edb.168.2021.05.24.08.36.59; Mon, 24 May 2021 08:37:22 -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=n0zM92tl; 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 S233987AbhEXPg5 (ORCPT + 99 others); Mon, 24 May 2021 11:36:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:51622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233552AbhEXPdm (ORCPT ); Mon, 24 May 2021 11:33:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3B35061402; Mon, 24 May 2021 15:31:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870307; bh=jCp0YRJbgFC5eVgFlVGy47mXapRW3TuuftW3gE4nLDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n0zM92tlUW/emJP9trLGQVbHAnu+TnnWzxdzIFdNMxST1rbaToOBdu2i8RlrilA4e lZUmGwi9auraJ8T8V08i/bweCRLUj/szBlXeDLDCqRnHo0QTzFcw33oTMfdLGjSvSx b9U7wmJL8EbZjHqtsvzL7Ps65ddmYjEuWB/I13KI= 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.9 03/36] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() Date: Mon, 24 May 2021 17:24:48 +0200 Message-Id: <20210524152324.271300943@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152324.158146731@linuxfoundation.org> References: <20210524152324.158146731@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 104e13ae3428..9ec18463b452 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c @@ -1102,7 +1102,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