Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4880360rwb; Mon, 21 Nov 2022 13:14:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf78csUZUb0ScLcjoqQ7R15gcDMCUXaTF2agvftEPGUb3h2eb2QXAPPTqIJHiH7NWCFnLgz+ X-Received: by 2002:a17:903:2109:b0:186:8d7b:377e with SMTP id o9-20020a170903210900b001868d7b377emr1401117ple.19.1669065278363; Mon, 21 Nov 2022 13:14:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669065278; cv=none; d=google.com; s=arc-20160816; b=dsElRqIvvRb9NYOfLG6NK3AYGkYdLeQS3sQfyvPdLjHIX6kNMq3t3S9DO59m60tQ67 COIsybQx8x42XtEysYot609tCjUnB14cEyZyizJiyAvIGWQcEPHvU7pkqQqLqjN7fEN0 Blpo0OZi4aHumNpbl3rd96KYYAx2aYZ4vczqhrrQvEP/x6yYPvMTH4rV7Nb8w/TVIOTl 0c2OLjNzz+Auvjs0zGKn+nYr+d8w16Y+dOtiSqM9dUkP/V4+hN0my3Y3itMDCmYRCwMP lJ74NDU6ps5i23Pt8mqX7HRlxCrRA0+Dq9ixC1x9Y4z8iu7QvEytz5FnzUXTz+Cbz3mT 4oaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=VZbBo1Xf3bG+qPPO7NA18BTxSOnurc7dPlHTI2WGBqY=; b=dnUcUxQ/Dke1W0rhOtEhDJz2jW6dSvf1EAnYQkuO5gv2Zs4gZC9GVvphtgTM+hez4u 5Qvcq8kd5/lCcnYjjPfb2boff8Jg1yCTlkMDPDx04kni81gMeiC0yIL/eNv8ZxMQ/kV/ z3DqVCaycNLZ2ezbnQv695pZDljYgmlwqdJVuStKzcSs122Tt0v71Kihp1vcjGVByXZ3 JIhnmA8C6iuwUTJtxk/6k3AXNpN+2oVY0HaMQJTO3tfhvFdYurRQlZgcenTHeeexuOUA XmnQII+WPu/dLsXWBVaJHdtaDCJalyMHkVH4vzMiH7MIDkuEaouCn8oRKRR8XnAJRyTk OusA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id np5-20020a17090b4c4500b00212e91e621csi14097083pjb.144.2022.11.21.13.14.26; Mon, 21 Nov 2022 13:14:38 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229568AbiKUVJA (ORCPT + 91 others); Mon, 21 Nov 2022 16:09:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbiKUVI7 (ORCPT ); Mon, 21 Nov 2022 16:08:59 -0500 Received: from smtp.smtpout.orange.fr (smtp-28.smtpout.orange.fr [80.12.242.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41EDEC660A for ; Mon, 21 Nov 2022 13:08:48 -0800 (PST) Received: from [192.168.1.18] ([86.243.100.34]) by smtp.orange.fr with ESMTPA id xE22ozk4OuZP6xE22oT8A1; Mon, 21 Nov 2022 22:08:46 +0100 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 21 Nov 2022 22:08:46 +0100 X-ME-IP: 86.243.100.34 Message-ID: <2e4c6ee6-d8d5-b4fe-ab60-cb6f440c2dee@wanadoo.fr> Date: Mon, 21 Nov 2022 22:08:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] interconnect: qcom: icc-rpmh: Fix an error handling path in qcom_icc_rpmh_probe() Content-Language: fr To: Luca Weiss , Andy Gross , Bjorn Andersson , Konrad Dybcio , Georgi Djakov Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org References: From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 Le 21/11/2022 à 08:42, Luca Weiss a écrit : > Hi Christophe, > > On Sun Nov 20, 2022 at 1:35 PM CET, Christophe JAILLET wrote: >> If of_platform_populate() fails, some resources need to be freed as already >> done in the other error handling paths. >> >> Fixes: 57eb14779dfd ("interconnect: qcom: icc-rpmh: Support child NoC device probe") > > I believe the same needs to be applied to icc-rpm.c. I'll give it a look and send a v2. CJ > > Also there shouldn't be an empty line here between Fixes: and Signed-off-by: > > Regards > Luca > >> >> Signed-off-by: Christophe JAILLET >> --- >> drivers/interconnect/qcom/icc-rpmh.c | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/interconnect/qcom/icc-rpmh.c b/drivers/interconnect/qcom/icc-rpmh.c >> index fd17291c61eb..5168bbf3d92f 100644 >> --- a/drivers/interconnect/qcom/icc-rpmh.c >> +++ b/drivers/interconnect/qcom/icc-rpmh.c >> @@ -235,8 +235,11 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev) >> platform_set_drvdata(pdev, qp); >> >> /* Populate child NoC devices if any */ >> - if (of_get_child_count(dev->of_node) > 0) >> - return of_platform_populate(dev->of_node, NULL, NULL, dev); >> + if (of_get_child_count(dev->of_node) > 0) { >> + ret = of_platform_populate(dev->of_node, NULL, NULL, dev); >> + if (ret) >> + goto err; >> + } >> >> return 0; >> err: >> -- >> 2.34.1 > >