From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11873C61DA3 for ; Fri, 24 Feb 2023 09:09:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229557AbjBXJJI convert rfc822-to-8bit (ORCPT ); Fri, 24 Feb 2023 04:09:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjBXJJH (ORCPT ); Fri, 24 Feb 2023 04:09:07 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CEAF10F2 for ; Fri, 24 Feb 2023 01:09:06 -0800 (PST) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVU4O-0001Ii-0L; Fri, 24 Feb 2023 10:08:48 +0100 Message-ID: Subject: Re: [PATCH v4 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them From: Lucas Stach To: Marek Vasut , linux-arm-kernel@lists.infradead.org Cc: Alexander Stein , Fabio Estevam , Krzysztof Kozlowski , Laurent Pinchart , NXP Linux Team , Paul Elder , Peng Fan , Pengutronix Kernel Team , Richard Cochran , Richard Zhu , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org Date: Fri, 24 Feb 2023 10:08:45 +0100 In-Reply-To: <20230223151043.41548-3-marex@denx.de> References: <20230223151043.41548-1-marex@denx.de> <20230223151043.41548-3-marex@denx.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.3 (3.46.3-1.fc37) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: devicetree@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Am Donnerstag, dem 23.02.2023 um 16:10 +0100 schrieb Marek Vasut: > This particular block can have DT subnodes describing the LVDS LDB > bridge. Instead of misusing simple-bus to scan for those nodes, do > the scan within the driver. > > Fixes: 94e6197dadc9 ("arm64: dts: imx8mp: Add LCDIF2 & LDB nodes") > Signed-off-by: Marek Vasut > --- > Cc: Alexander Stein > Cc: Fabio Estevam > Cc: Krzysztof Kozlowski > Cc: Laurent Pinchart > Cc: Lucas Stach > Cc: NXP Linux Team > Cc: Paul Elder > Cc: Peng Fan > Cc: Pengutronix Kernel Team > Cc: Richard Cochran > Cc: Richard Zhu > Cc: Rob Herring > Cc: Sascha Hauer > Cc: Shawn Guo > Cc: devicetree@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > --- > V2: - Turn this into 3/4 > - Warn and continue in case of error > V3: Add RB from Liu > V4: - Use devm_of_platform_populate() > - Remove RB from Liu > --- > drivers/soc/imx/imx8m-blk-ctrl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c > index 399cb85105a18..77e7dc4eb8cff 100644 > --- a/drivers/soc/imx/imx8m-blk-ctrl.c > +++ b/drivers/soc/imx/imx8m-blk-ctrl.c > @@ -310,7 +310,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) > > dev_set_drvdata(dev, bc); > > - return 0; > + return devm_of_platform_populate(dev); You need to handle the return value, not simply pass it through as the return value of the probe function. When devm_of_platform_populate fails you miss to clean up the genpd provider and detach from the power domains. Regards, Lucas > > cleanup_provider: > of_genpd_del_provider(dev->of_node);