Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3875855rwb; Mon, 21 Nov 2022 00:11:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf5TSD+bSiJQ0yDiJ4kZF8yxyOHzoKDgLQjDXBkESOvXayhD+Cic21+ke1voESTUxceEiZ8s X-Received: by 2002:a17:902:a5ca:b0:186:bb48:2b34 with SMTP id t10-20020a170902a5ca00b00186bb482b34mr10956258plq.1.1669018270258; Mon, 21 Nov 2022 00:11:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669018270; cv=none; d=google.com; s=arc-20160816; b=zm7tPcgcbZ6pLnhNjN/b6jK8VJhclLuGxwRymLxM0Ryp1Rev/OFNMMiha83LnLAQyZ 0fVq1TzhmNbVfQo7J8lX0p3rOZOwjnzG9pD7hdi2CYChYO9rMOPKg+5TLYjEASX0EyCo 3kOvfkGS+AT1/x4taS0iARB5AR6plc+ofjQltId4TxRESith2NY5ZLpL0ZVJaHm53Zt7 +qgcRyo7f1dBtz+1mAD+JxKRzlT09TofOUdcMx7grxH390k8mXCo34zIJsOef7oTSg/j WmPPQBsT8yTFUCK8IEEIb70s+2JcGcdTMqxTy9dKGSItP+RXMha9jOss5t023s0n94uT EbfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:subject:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=1TUVIyfnzpJrJjjktkuqFcVCWlSjqMueZ8oSh19wEx0=; b=y0E97ibENCGVT6noXllPdjWgLnA4T/2tMSY0m9vR6c3ZVF8Q8QgjN7ClI55oaihRm7 BaSUERb+7zVTg50VNeucpqpUlsL1zyNsGe2y+r9KwfAOPrsojtzmCINjZ12LCGKIdNuI f1slj/bduhRwvlqbkA+6IDe8LZ3sjFGL9wpC21VgReR5GyQrmgbb+e5DbST6LNNDdCor oGdXwxUGv78IxwKQheWlcfcMquPNOhTnrElHGixvKbhQtLySdZNwp5ZDEAsJL8otfA6i whKi7XtXWk4BjXsjC9X7V85ptuBkA/J1xbCW+9db/+tD+N7FFE+PZ1m+SoJ6LsL/mAAj Pqug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=u8HULqbg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a170902e80500b001727963f929si11639866plg.130.2022.11.21.00.10.57; Mon, 21 Nov 2022 00:11:10 -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; dkim=pass header.i=@fairphone.com header.s=fair header.b=u8HULqbg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229916AbiKUHnR (ORCPT + 92 others); Mon, 21 Nov 2022 02:43:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbiKUHnE (ORCPT ); Mon, 21 Nov 2022 02:43:04 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F4764F18F for ; Sun, 20 Nov 2022 23:43:02 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id v8so3978360edi.3 for ; Sun, 20 Nov 2022 23:43:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1TUVIyfnzpJrJjjktkuqFcVCWlSjqMueZ8oSh19wEx0=; b=u8HULqbgDO1V1jjNHkBZ+tyxbUE+H5slR0LHOlbfeZAo3EEj10DJVA0a7eNayrx8QE qkAIPnZN/1pyhj7djHgxGa6H6GOEPzp/BK4X9QN1iUaQzkZv42i3cBJppROe/Ej/iZ3E DrQx85QkfKzETnYKoXMc/xsfBK04j9UbGhery64BTRSdObqu0tUQYDhy/q1NdZpfw1aY 6ZBdw+RMjZ8k2siwz+RcwlWJnWHhxYnldUPd4gqHu6++LVwVBmdtRmk885K7XmSv09fm WbY3hF41oKOfCmenytGGcYFTMJYtm8wOhq+6nnTuT0a8an7eKvRjiv2AKO21kjqiN3Zo tiUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=1TUVIyfnzpJrJjjktkuqFcVCWlSjqMueZ8oSh19wEx0=; b=CyU9ysy0V+7jz1TVhLIqTQ9C9BErgIttzeSkqqYRxl3qI9eEr83uTeR2DavuyeHdB0 hlDnJ8Atg0JUdyVofzRzPAaHfuvPKY2xyDMRWUA7pruAinS8/JOZapSqzrRmyY3UeYPp EjO8mKNsU4FF8btucmacUuC17F+D28IyDFJbZ65gNQ9MC3BQ5Us50eEWAeUC1+9H1SsH kH7zLpjSC7jdE0Nm+yX+ee76hlK0saErp8gSUPFUqrHtGMaucBESQ9uDZKFoL0efonZ4 LSLnVaBaoKWn5g408LTW58RurOqhYz3ZbKgt1eGySdPjfvxtpQHeZ0dsllhRX/bKerrw 6shA== X-Gm-Message-State: ANoB5plLXQMZ4CfyB+w+j0Q7jC7B9Jad2wtF0qL23BP9QL18J11Wa4ew BvZd2GubRmacNZFWELGRLbjIQQ== X-Received: by 2002:a05:6402:2a09:b0:461:30d8:6742 with SMTP id ey9-20020a0564022a0900b0046130d86742mr14964115edb.172.1669016580728; Sun, 20 Nov 2022 23:43:00 -0800 (PST) Received: from localhost (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id e10-20020a170906648a00b007adade0e9easm4667280ejm.85.2022.11.20.23.42.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Nov 2022 23:42:59 -0800 (PST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 21 Nov 2022 08:42:58 +0100 Message-Id: Cc: , , , Subject: Re: [PATCH] interconnect: qcom: icc-rpmh: Fix an error handling path in qcom_icc_rpmh_probe() From: "Luca Weiss" To: "Christophe JAILLET" , "Andy Gross" , "Bjorn Andersson" , "Konrad Dybcio" , "Georgi Djakov" X-Mailer: aerc 0.13.0 References: In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 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 alrea= dy > done in the other error handling paths. > > Fixes: 57eb14779dfd ("interconnect: qcom: icc-rpmh: Support child NoC dev= ice probe") I believe the same needs to be applied to icc-rpm.c. 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); > =20 > /* 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 =3D of_platform_populate(dev->of_node, NULL, NULL, dev); > + if (ret) > + goto err; > + } > =20 > return 0; > err: > --=20 > 2.34.1