Skip to content

Commit bbde146

Browse files
Yuuoniystorulf
authored andcommitted
pmdomain: imx: Fix reference count leak in imx_gpc_remove
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: stable@vger.kernel.org Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent fccac54 commit bbde146

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
@@ -536,6 +536,8 @@ static void imx_gpc_remove(struct platform_device *pdev)
536536
return;
537537
}
538538
}
539+
540+
of_node_put(pgc_node);
539541
}
540542

541543
static struct platform_driver imx_gpc_driver = {

0 commit comments

Comments
 (0)