mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-21 13:24:15 +08:00
media: atmel: atmel-isc: Fix PM disable depth imbalance in atmel_isc_probe
[ Upstream commit395829c61a
] 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:0a0e265515
("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>
This commit is contained in:
parent
204e53586b
commit
f0d9105f28
@ -537,7 +537,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 */
|
||||
@ -555,6 +555,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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user