From patchwork Mon May 24 15:25:05 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: 446458 Delivered-To: patch@linaro.org Received: by 2002:a17:907:2b0d:0:0:0:0 with SMTP id gc13csp3786628ejc; Mon, 24 May 2021 08:53:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxygoNl0asMIF6B9/VJJS95ZTW4gn5QsF6nj+R9KfaqKcRU31bKF1urxH3zM6rkhuFxHawg X-Received: by 2002:a17:907:2d8d:: with SMTP id gt13mr7424884ejc.162.1621871639099; Mon, 24 May 2021 08:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621871639; cv=none; d=google.com; s=arc-20160816; b=0JaJ/5lh/lKVl9hOjTW7aVmOfLhGYMnbJnzsr64ncmKeWv/7tCTMCoJyJ9V6uDFyB/ oNoItG6mAfwHYZio7Ylb33dcmefrFUikcIz+2pWmJQjJUps0sFMr8q4ItEozS8lbqF28 eZH71qkxOAWCIXhdDNHaSaruVN4StTcr3MH94E5k2v6kNr47vFEL2PaeK/LcvYfZIM4I 0sRJC/Bf+Sxt2tb4UjIU/+W3f9ZbBH0tInQLZwuyBXqhS1FuN6TqWMrlODosjnGWpvFC WKreeVsB/BjvD9UH8n/71xnHdLj9CtA2HNQkbptQPMyl9zdRoJJgt5My+7CIyJTCHp7F yZFA== 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=0N5jYiMG3KMc+KHiuJSYI/urL/rkoHx2+H+QVlTfhqM=; b=Ek/kcWZFMTG//LxEBwOAG1T/gloYumYJxXZ2xxn10ctrwdg8rZlQZU4t3/OplBpbik QPuFmQo9zAeQeqsv0PIqq0HBLEvN6dAL7Mxs0o0hNcP0b5vmbblqK417zz8yJLpHuwJQ o3U6nYZ8nW0ENzCaxvKM4wQdQ8Rs0cjdkfjRqmixwOTrtDpPv8g7DvqXn3vGwLfl6P/7 mSh4jJXEkASKLORjuPGz529zrt7hj6dX6OjHDiaGB/gjiS/enlXorJXrkZREp+nXnyiM D/jkUN7t4W7UQtweM2iRJFp2VlcuAFSTt/dBs9AHuV8cIIZXXC5dLo2du+HyaQ19u7LO hZLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VTAc0O0k; 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 i2si4407336edc.332.2021.05.24.08.53.58; Mon, 24 May 2021 08:53:59 -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=VTAc0O0k; 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 S233171AbhEXPzK (ORCPT + 12 others); Mon, 24 May 2021 11:55:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:38646 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233985AbhEXPwF (ORCPT ); Mon, 24 May 2021 11:52:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AA41B613E4; Mon, 24 May 2021 15:38:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870734; bh=ZLvKPy560rOp4foRSQ0/RNlaixVa3FYvRKhxtV5t04U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VTAc0O0kSk7Cq9eVHqD7D1X2edjn8z+ao1B55O7Upi5QffRPK3Sztv+iMatkyYnNM T3GqfFjP3yOcp1hiHQ6FGK4j7tHEmHH7p3Mca4b66lArfRGiFzZQuQ3JKdWMALk4Em JJgjRDJBcTw2S80UIkapd0qIRCd6OVc0s0FvUw3U= 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.10 010/104] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() Date: Mon, 24 May 2021 17:25:05 +0200 Message-Id: <20210524152333.176560633@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152332.844251980@linuxfoundation.org> References: <20210524152332.844251980@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 b3ba0de5d4fb..0563c9530dca 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c @@ -1066,7 +1066,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);