mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
pmdomain: imx: Fix reference count leak in imx_gpc_remove
commitbbde14682eupstream. 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:721cabf6c6("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
921b090841
commit
47d412d48b
@@ -537,6 +537,8 @@ static void imx_gpc_remove(struct platform_device *pdev)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
of_node_put(pgc_node);
|
||||
}
|
||||
|
||||
static struct platform_driver imx_gpc_driver = {
|
||||
|
||||
Reference in New Issue
Block a user