fpga: zynq-fpga: Fix unbalanced clock handling

This commit fixes the unbalanced clock handling, where
a failed probe would leave the clock with an enable count of -1.

Reported-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Moritz Fischer 2015-10-19 13:35:33 -07:00 коммит произвёл Greg Kroah-Hartman
Родитель 525d12f27b
Коммит 6376931bab
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -487,7 +487,7 @@ static int zynq_fpga_probe(struct platform_device *pdev)
&zynq_fpga_ops, priv);
if (err) {
dev_err(dev, "unable to register FPGA manager");
clk_disable_unprepare(priv->clk);
clk_unprepare(priv->clk);
return err;
}
@ -502,7 +502,7 @@ static int zynq_fpga_remove(struct platform_device *pdev)
priv = platform_get_drvdata(pdev);
clk_disable_unprepare(priv->clk);
clk_unprepare(priv->clk);
return 0;
}