media: atmel: atmel-isc: Fix PM disable depth imbalance in atmel_isc_probe
authorMiaoqian Lin <linmq006@gmail.com>
Mon, 7 Mar 2022 08:16:37 +0000 (09:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:57 +0000 (10:22 +0200)
commitf0d9105f28439e199b2a18fe5ef26f1dcebe2561
tree0961e75b3860420dcc1413493ecb061765b7ed70
parent204e53586b362a0f1f572f14e888412c9aa426b4
media: atmel: atmel-isc: Fix PM disable depth imbalance in atmel_isc_probe

[ Upstream commit 395829c61a196a0821a703a49c4db3ac51daff73 ]

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: 0a0e265515db ("media: atmel: atmel-isc: split driver into driver base and isc")
Signed-off-by: Miaoqian Lin <linmq006@gmail.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/atmel/atmel-sama5d2-isc.c