mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 01:43:18 +00:00
of_get_child_by_name() returns a node pointer with refcount incremented.
Use the __free() attribute to manage the pgc_node reference, ensuring
automatic of_node_put() cleanup when pgc_node goes out of scope.
This eliminates the need for explicit error handling paths and avoids
reference count leaks.
Fixes: 721cabf6c6 ("soc: imx: move PGC handling to a new GPC driver")
Cc: [email protected]
Signed-off-by: Wentao Liang <[email protected]>
Reviewed-by: Frank Li <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>