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)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 27 Sep 2020 08:50:16 +0000 (10:50 +0200)
commitdbd2f2dc025f9be8ae063e4f270099677238f620
tree8fe54299475d6d7dbde8ea71a8a8f6841087f7a0
parente88349437654f9d1b3c144049b9990026f911e56
media: bdisp: Fix runtime PM imbalance on error

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>
drivers/media/platform/sti/bdisp/bdisp-v4l2.c