mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
media: staging: rkisp1: cap: fix runtime PM imbalance on error
[ Upstream commit4cbbe2aaa0] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference imbalance in rkisp1_vb2_start_streaming, so we should fix it. Fixes:56e3b29f9f("media: staging: rkisp1: add streaming paths") Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cbb25882cd
commit
d5b2529aa5
@@ -992,6 +992,7 @@ rkisp1_vb2_start_streaming(struct vb2_queue *queue, unsigned int count)
|
|||||||
|
|
||||||
ret = pm_runtime_get_sync(cap->rkisp1->dev);
|
ret = pm_runtime_get_sync(cap->rkisp1->dev);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
pm_runtime_put_noidle(cap->rkisp1->dev);
|
||||||
dev_err(cap->rkisp1->dev, "power up failed %d\n", ret);
|
dev_err(cap->rkisp1->dev, "power up failed %d\n", ret);
|
||||||
goto err_destroy_dummy;
|
goto err_destroy_dummy;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user