Skip to content

Commit ae65e73

Browse files
Yuuoniygregkh
authored andcommitted
pmdomain: imx: Fix reference count leak in imx_gpc_remove
commit bbde14682eba21d86f5f3d6fe2d371b1f97f1e61 upstream. of_get_child_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when not needed anymore. Add the missing of_node_put() to avoid refcount leak. Fixes: 721cabf ("soc: imx: move PGC handling to a new GPC driver") Cc: [email protected] Signed-off-by: Miaoqian Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 983e91d commit ae65e73

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • drivers/pmdomain/imx

drivers/pmdomain/imx/gpc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,8 @@ static void imx_gpc_remove(struct platform_device *pdev)
537537
return;
538538
}
539539
}
540+
541+
of_node_put(pgc_node);
540542
}
541543

542544
static struct platform_driver imx_gpc_driver = {

0 commit comments

Comments
 (0)