diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-05-21 11:36:27 +0300 |
|---|---|---|
| committer | Ulf Hansson <ulfh@kernel.org> | 2026-06-03 12:49:37 +0300 |
| commit | fba0510cd62666951dcc0221527edc0c47ae6599 (patch) | |
| tree | 31b67c49fbc0ff0fda22023d4f0a7c33d8922264 | |
| parent | 4db207599acfc9d676340daa2dc6b52bfca17db4 (diff) | |
| download | linux-fba0510cd62666951dcc0221527edc0c47ae6599.tar.xz | |
pmdomain: imx: fix OF node refcount
for_each_child_of_node_scoped() decrements the reference count of the
nod after each iteration. Assigning it without incrementing the refcount
to a dynamically allocated platform device will result in a double put
in platform_device_release(). Add the missing call to of_node_get().
Cc: stable@vger.kernel.org
Fixes: 3e4d109ee8fc ("pmdomain: imx: gpc: Simplify with scoped for each OF child loop")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
| -rw-r--r-- | drivers/pmdomain/imx/gpc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pmdomain/imx/gpc.c b/drivers/pmdomain/imx/gpc.c index de695f1944ab..42e50c9b4fb9 100644 --- a/drivers/pmdomain/imx/gpc.c +++ b/drivers/pmdomain/imx/gpc.c @@ -487,7 +487,7 @@ static int imx_gpc_probe(struct platform_device *pdev) domain->ipg_rate_mhz = ipg_rate_mhz; pd_pdev->dev.parent = &pdev->dev; - pd_pdev->dev.of_node = np; + pd_pdev->dev.of_node = of_node_get(np); pd_pdev->dev.fwnode = of_fwnode_handle(np); ret = platform_device_add(pd_pdev); |
