MLK-24009-4 arm64: imx8mq: vpu: g1/g2: fix build issue as module
fix clk use-after-free issue Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
This commit is contained in:
parent
420a357a1b
commit
0d1b3814c9
|
@ -1858,6 +1858,13 @@ static int hantro_dev_remove(struct platform_device *pdev)
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
hantro_clk_disable(&pdev->dev);
|
hantro_clk_disable(&pdev->dev);
|
||||||
|
|
||||||
|
if (!IS_ERR(hantro_clk_g1))
|
||||||
|
clk_put(hantro_clk_g1);
|
||||||
|
if (!IS_ERR(hantro_clk_g2))
|
||||||
|
clk_put(hantro_clk_g2);
|
||||||
|
if (!IS_ERR(hantro_clk_bus))
|
||||||
|
clk_put(hantro_clk_bus);
|
||||||
|
|
||||||
#ifdef CONFIG_DEVICE_THERMAL
|
#ifdef CONFIG_DEVICE_THERMAL
|
||||||
HANTRO_UNREG_THERMAL_NOTIFIER(&hantro_thermal_hot_notifier);
|
HANTRO_UNREG_THERMAL_NOTIFIER(&hantro_thermal_hot_notifier);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1924,12 +1931,7 @@ static int __init hantro_init(void)
|
||||||
|
|
||||||
static void __exit hantro_exit(void)
|
static void __exit hantro_exit(void)
|
||||||
{
|
{
|
||||||
if (!IS_ERR(hantro_clk_g1))
|
|
||||||
clk_put(hantro_clk_g1);
|
|
||||||
if (!IS_ERR(hantro_clk_g2))
|
|
||||||
clk_put(hantro_clk_g2);
|
|
||||||
if (!IS_ERR(hantro_clk_bus))
|
|
||||||
clk_put(hantro_clk_bus);
|
|
||||||
#if 0
|
#if 0
|
||||||
if (!IS_ERR(hantro_regulator))
|
if (!IS_ERR(hantro_regulator))
|
||||||
regulator_put(hantro_regulator);
|
regulator_put(hantro_regulator);
|
||||||
|
|
Loading…
Reference in New Issue