1
0
Fork 0

MLK-24009-3 arm64: imx8mm: vpu: h1: fix build issue as module

release clk to avoid memory leak

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Zhou Peng 2020-05-14 14:48:09 +08:00
parent 76d95bf263
commit 420a357a1b
1 changed files with 5 additions and 1 deletions

View File

@ -845,6 +845,11 @@ static int hantro_h1_dev_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
hantro_h1_clk_disable(&pdev->dev);
if (!IS_ERR(hantro_clk_h1))
clk_put(hantro_clk_h1);
if (!IS_ERR(hantro_clk_h1_bus))
clk_put(hantro_clk_h1_bus);
return 0;
}
@ -909,7 +914,6 @@ static int __init hantro_h1_init(void)
static void __exit hantro_h1_exit(void)
{
//clk_put(hantro_clk);
platform_driver_unregister(&mxchantro_h1_driver);
}