1
0
Fork 0
alistair23-linux/drivers/media/platform/qcom
Dinghao Liu 05f9cc28a9 media: venus: core: Fix runtime PM imbalance in venus_probe
[ Upstream commit bbe516e976 ]

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code. Thus a pairing decrement is needed on
the error handling path to keep the counter balanced. For other error
paths after this call, things are the same.

Fix this by adding pm_runtime_put_noidle() after 'err_runtime_disable'
label. But in this case, the error path after pm_runtime_put_sync()
will decrease PM usage counter twice. Thus add an extra
pm_runtime_get_noresume() in this path to balance PM counter.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:58:03 +01:00
..
camss media: camss: Fix a reference count leak. 2020-10-29 09:57:33 +01:00
venus media: venus: core: Fix runtime PM imbalance in venus_probe 2020-10-29 09:58:03 +01:00