]> git.hungrycats.org Git - linux/commit
pmdomain: imx: fix OF node refcount
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Thu, 21 May 2026 08:36:27 +0000 (10:36 +0200)
committerUlf Hansson <ulfh@kernel.org>
Wed, 3 Jun 2026 09:49:37 +0000 (11:49 +0200)
commitfba0510cd62666951dcc0221527edc0c47ae6599
tree31b67c49fbc0ff0fda22023d4f0a7c33d8922264
parent4db207599acfc9d676340daa2dc6b52bfca17db4
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>
drivers/pmdomain/imx/gpc.c