media: st-delta: Fix PM disable depth imbalance in delta_probe
authorMiaoqian Lin <linmq006@gmail.com>
Mon, 7 Mar 2022 08:08:59 +0000 (09:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:57 +0000 (10:22 +0200)
commit204e53586b362a0f1f572f14e888412c9aa426b4
tree8a7ac146853385d0cfc23b866fccd3d63106df2d
parent0d21276083480b1ca0af87342c1309f06ee23cb3
media: st-delta: Fix PM disable depth imbalance in delta_probe

[ Upstream commit 94e3dba710fe0afc772172305444250023fc2d30 ]

The pm_runtime_enable will decrease power disable depth.
If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().

Fixes: f386509e4959 ("[media] st-delta: STiH4xx multi-format video decoder v4l2 driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Acked-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/sti/delta/delta-v4l2.c