OSDN Git Service

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)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:02 +0000 (11:02 +0200)
commit94e3dba710fe0afc772172305444250023fc2d30
treec2193f5762c93b8a2bd3ac5dacb778d1f45afdcc
parent5c0db68ce0faeb000c3540d095eb272d671a6e03
media: st-delta: Fix PM disable depth imbalance in delta_probe

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