diff options
author | Stanimir Varbanov <stanimir.varbanov@linaro.org> | 2020-03-31 18:37:02 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-05 14:03:47 +0300 |
commit | 82223aa54bb7075e9bf24b64720c18361ed190a1 (patch) | |
tree | 2087c3ce55bc1c7a5c26fa55f7303a0c354d5bad /drivers/media/platform/qcom | |
parent | cb1c05c89b1f0b5ee24b65fbad3811127f3205d0 (diff) | |
download | linux-82223aa54bb7075e9bf24b64720c18361ed190a1.tar.xz |
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: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom')
-rw-r--r-- | drivers/media/platform/qcom/venus/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index f8b9a732bc65..afd76bcd9978 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -318,7 +318,6 @@ static int venus_remove(struct platform_device *pdev) ret = hfi_core_deinit(core, true); WARN_ON(ret); - hfi_destroy(core); venus_shutdown(core); of_platform_depopulate(dev); @@ -330,6 +329,8 @@ static int venus_remove(struct platform_device *pdev) if (pm_ops->core_put) pm_ops->core_put(dev); + hfi_destroy(core); + icc_put(core->video_path); icc_put(core->cpucfg_path); |