media: staging: rkisp1: cap: fix runtime PM imbalance on error
authorZhang Qilong <zhangqilong3@huawei.com>
Mon, 2 Nov 2020 14:28:52 +0000 (15:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:11 +0000 (11:53 +0100)
commitd5b2529aa572bb0da814146f6794f49b5e9110be
tree53c8bd136ac93e0dd959a383026c6b4402c918ac
parentcbb25882cd66de5b84fa8762c176e5c7c2a76dba
media: staging: rkisp1: cap: fix runtime PM imbalance on error

[ Upstream commit 4cbbe2aaa0536b0e7b3dfbd7febc3bc2ec300559 ]

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: 56e3b29f9f6b2 ("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>
drivers/staging/media/rkisp1/rkisp1-capture.c