Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1567394rwb; Thu, 10 Nov 2022 19:04:48 -0800 (PST) X-Google-Smtp-Source: AMsMyM4KqFlD+HfqdHTQPFQgze9EOSvsmPGHvFR1QmP94O5FrCa2v5S1C7PKPF1eHQjtX1BQ2c2u X-Received: by 2002:a65:534c:0:b0:434:4add:44b9 with SMTP id w12-20020a65534c000000b004344add44b9mr4420222pgr.375.1668135887843; Thu, 10 Nov 2022 19:04:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668135887; cv=none; d=google.com; s=arc-20160816; b=TZ5ibOsRAzzBbUAsrEW80lCuXMEzWD5A1DWgmSGDeR7ypsVG5vlwGa7IVYCFRXg/81 JCdRkMoLJyRQD09LsbFa1pGzBjJLQN5DE7/FWxhEPKi0Nj9SnWpOQXTAn1bxlR4WfPvz VKEU+Wu7LgSM9iW6uUIynlzRtjGI5Rbewkjl/YvaapBGZwHL45N9aPNHIYbMsQn/VF9w Pvx6fmtBCHULlOwxt7VJTMVxbYO1b/MYoQlaL+i7RAeXkw55FqtRgibD5bWeuyvif/dZ Rl/O0nrxrRnFuB/w4qJJcUTq779iKZ9yq78VPuUHk2Hkimf+Paj78ciPYuvaPiLGdnmG ULQQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ck1wSVbjC9yWazfw7vfEVsmBBr6f6EeTNJsZxCh6vv4=; b=ylE6SNTae2dudoXJnLyQLQTa/DK2n/EKZxkGArl/Xui7muXfw03TbHIg9CHqVVwwtF iSP+A5zEBAZMPB5GyEEl/coZ1LD3K9t3+PsrF1IByUA18rx41o4RDGsou7jxx4g4t3oK APweosNKTk7JuI2wLVS43uPQH9Sh54YVRTIWvBoHNc9QRJs3fwIFQ4KmDT1f0Nby4uYB fnAq8zObO6zgHxrrso//VCISzeCNks4VNdkHomE4vZ84a1ntlDr3B4wF5ZIH9f/80P0j 6lefkS2uSmuWlZ0N98mbvKQMgh8QfMfKAs+qHXx69grAPu8bs5qNMZVXhM8gHrV+9k8d Wnzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 16-20020a631550000000b0046edf6e538asi1038553pgv.417.2022.11.10.19.04.34; Thu, 10 Nov 2022 19:04:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233004AbiKKCtw (ORCPT + 92 others); Thu, 10 Nov 2022 21:49:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233015AbiKKCth (ORCPT ); Thu, 10 Nov 2022 21:49:37 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD630DF0A; Thu, 10 Nov 2022 18:47:06 -0800 (PST) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4N7jgZ37xHzbmlq; Fri, 11 Nov 2022 10:43:22 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 11 Nov 2022 10:47:04 +0800 Received: from localhost.localdomain (10.28.79.22) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 11 Nov 2022 10:47:04 +0800 From: Huisong Li To: , CC: , , , , , , , , , , , Subject: [PATCH V2 2/2] mailbox: pcc: fix 'pcc_chan_count' when fail to initialize PCC Date: Fri, 11 Nov 2022 10:44:48 +0800 Message-ID: <20221111024448.25012-3-lihuisong@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20221111024448.25012-1-lihuisong@huawei.com> References: <20221110015034.7943-1-lihuisong@huawei.com> <20221111024448.25012-1-lihuisong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, 'pcc_chan_count' is a non-zero value if PCC subspaces are parsed successfully and subsequent processes is failure during initializing PCC process. This may cause that pcc_mbox_request_channel() can still be executed successfully , which will misleads the caller that this channel is available. Fixes: ce028702ddbc ("mailbox: pcc: Move bulk of PCCT parsing into pcc_mbox_probe") Signed-off-by: Huisong Li --- drivers/mailbox/pcc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index 3c2bc0ca454c..105d46c9801b 100644 --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c @@ -743,6 +743,7 @@ static int __init pcc_init(void) if (IS_ERR(pcc_pdev)) { pr_debug("Err creating PCC platform bundle\n"); + pcc_chan_count = 0; return PTR_ERR(pcc_pdev); } -- 2.22.0