Commit 395829c6 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Mauro Carvalho Chehab

media: atmel: atmel-isc: Fix PM disable depth imbalance in atmel_isc_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: 0a0e2655 ("media: atmel: atmel-isc: split driver into driver base and isc")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 94e3dba7
......@@ -562,7 +562,7 @@ static int atmel_isc_probe(struct platform_device *pdev)
ret = clk_prepare_enable(isc->ispck);
if (ret) {
dev_err(dev, "failed to enable ispck: %d\n", ret);
goto cleanup_subdev;
goto disable_pm;
}
/* ispck should be greater or equal to hclock */
......@@ -580,6 +580,9 @@ static int atmel_isc_probe(struct platform_device *pdev)
unprepare_clk:
clk_disable_unprepare(isc->ispck);
disable_pm:
pm_runtime_disable(dev);
cleanup_subdev:
isc_subdev_cleanup(isc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment