diff options
author | Moritz Fischer <moritz.fischer@ettus.com> | 2015-10-19 16:35:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-23 19:49:12 -0400 |
commit | 6376931babd833dbd6f51e22a3de449ce6c60d61 (patch) | |
tree | 6d77e97b618dfccd144e84227fa84803ebd491b2 | |
parent | 525d12f27bb05c4255857849a8d28c0c086bd28e (diff) |
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>
-rw-r--r-- | drivers/fpga/zynq-fpga.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/zynq-fpga.c index 103303c88937..617d38281f49 100644 --- a/drivers/fpga/zynq-fpga.c +++ b/drivers/fpga/zynq-fpga.c | |||
@@ -487,7 +487,7 @@ static int zynq_fpga_probe(struct platform_device *pdev) | |||
487 | &zynq_fpga_ops, priv); | 487 | &zynq_fpga_ops, priv); |
488 | if (err) { | 488 | if (err) { |
489 | dev_err(dev, "unable to register FPGA manager"); | 489 | dev_err(dev, "unable to register FPGA manager"); |
490 | clk_disable_unprepare(priv->clk); | 490 | clk_unprepare(priv->clk); |
491 | return err; | 491 | return err; |
492 | } | 492 | } |
493 | 493 | ||
@@ -502,7 +502,7 @@ static int zynq_fpga_remove(struct platform_device *pdev) | |||
502 | 502 | ||
503 | priv = platform_get_drvdata(pdev); | 503 | priv = platform_get_drvdata(pdev); |
504 | 504 | ||
505 | clk_disable_unprepare(priv->clk); | 505 | clk_unprepare(priv->clk); |
506 | 506 | ||
507 | return 0; | 507 | return 0; |
508 | } | 508 | } |