From f5e885224409c7b3e39fe8bab65be79fc445a368 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 30 Dec 2024 11:14:54 +0000 Subject: [PATCH] Revert "leds: flash: mt6360: Fix device_for_each_child_node() refcounting in error paths" This reverts commit 28a01c6b3f18e22a3d40b04faece8b6896c25e8b which is commit 73b03b27736e440e3009fe1319cbc82d2cd1290c upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: I69e0e9a4c495afd1fb38ba691c5616e49b7fcf63 Signed-off-by: Greg Kroah-Hartman --- drivers/leds/flash/leds-mt6360.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/leds/flash/leds-mt6360.c b/drivers/leds/flash/leds-mt6360.c index 71c1ddd71f8e..2fab335a6425 100644 --- a/drivers/leds/flash/leds-mt6360.c +++ b/drivers/leds/flash/leds-mt6360.c @@ -797,6 +797,7 @@ static void mt6360_v4l2_flash_release(struct mt6360_priv *priv) static int mt6360_led_probe(struct platform_device *pdev) { struct mt6360_priv *priv; + struct fwnode_handle *child; size_t count; int i = 0, ret; @@ -823,7 +824,7 @@ static int mt6360_led_probe(struct platform_device *pdev) return -ENODEV; } - device_for_each_child_node_scoped(&pdev->dev, child) { + device_for_each_child_node(&pdev->dev, child) { struct mt6360_led *led = priv->leds + i; struct led_init_data init_data = { .fwnode = child, }; u32 reg, led_color;