]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: bdisp: Fix runtime PM imbalance on error
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Thu, 21 May 2020 10:00:21 +0000 (12:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:19 +0000 (10:08 +0100)
commite4f08676d93c2a8f44415a5845761b475979b892
tree34a322c204af52403d4c3449c9ed3d7b46a5b87d
parentbad248c1ec5376cc4d78418b0a60470dfe70a4b9
media: bdisp: Fix runtime PM imbalance on error

[ Upstream commit dbd2f2dc025f9be8ae063e4f270099677238f620 ]

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.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.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/media/platform/sti/bdisp/bdisp-v4l2.c