Commit 82223aa5 authored by Stanimir Varbanov's avatar Stanimir Varbanov Committed by Mauro Carvalho Chehab

media: venus: core: Fix mutex destroy in remove

The hfi_destroy function is called too early in remove method. It
destroys a mutex which is used later in the .remove from pmruntime.
Solve the issue by moving hfi_destroy after last usage of the mutex.
Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent cb1c05c8
...@@ -318,7 +318,6 @@ static int venus_remove(struct platform_device *pdev) ...@@ -318,7 +318,6 @@ static int venus_remove(struct platform_device *pdev)
ret = hfi_core_deinit(core, true); ret = hfi_core_deinit(core, true);
WARN_ON(ret); WARN_ON(ret);
hfi_destroy(core);
venus_shutdown(core); venus_shutdown(core);
of_platform_depopulate(dev); of_platform_depopulate(dev);
...@@ -330,6 +329,8 @@ static int venus_remove(struct platform_device *pdev) ...@@ -330,6 +329,8 @@ static int venus_remove(struct platform_device *pdev)
if (pm_ops->core_put) if (pm_ops->core_put)
pm_ops->core_put(dev); pm_ops->core_put(dev);
hfi_destroy(core);
icc_put(core->video_path); icc_put(core->video_path);
icc_put(core->cpucfg_path); icc_put(core->cpucfg_path);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment