[PATCH v4 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them
Lucas Stach
l.stach at pengutronix.de
Fri Feb 24 01:08:45 PST 2023
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 <marex at denx.de>
> ---
> Cc: Alexander Stein <alexander.stein at ew.tq-group.com>
> Cc: Fabio Estevam <festevam at gmail.com>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>
> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Cc: Lucas Stach <l.stach at pengutronix.de>
> Cc: NXP Linux Team <linux-imx at nxp.com>
> Cc: Paul Elder <paul.elder at ideasonboard.com>
> Cc: Peng Fan <peng.fan at nxp.com>
> Cc: Pengutronix Kernel Team <kernel at pengutronix.de>
> Cc: Richard Cochran <richardcochran at gmail.com>
> Cc: Richard Zhu <hongxing.zhu at nxp.com>
> Cc: Rob Herring <robh+dt at kernel.org>
> Cc: Sascha Hauer <s.hauer at pengutronix.de>
> Cc: Shawn Guo <shawnguo at kernel.org>
> Cc: devicetree at vger.kernel.org
> Cc: linux-arm-kernel at 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);
More information about the linux-arm-kernel
mailing list