clk: palmas: undo preparation of a clock source.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 28 Apr 2017 13:03:07 +0000 (18:33 +0530)
committerStephen Boyd <sboyd@codeaurora.org>
Fri, 2 Jun 2017 17:51:34 +0000 (10:51 -0700)
Undo preparation of a clock source, if palmas_clks_init_configure is not
successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-palmas.c

index 31f590cea493be6cb3faebfb740b479c4af7b004..7f51c01085abee76a30828f08b52bac935f172d5 100644 (file)
@@ -229,6 +229,7 @@ static int palmas_clks_init_configure(struct palmas_clock_info *cinfo)
                if (ret < 0) {
                        dev_err(cinfo->dev, "Ext config for %s failed, %d\n",
                                cinfo->clk_desc->clk_name, ret);
+                       clk_unprepare(cinfo->hw.clk);
                        return ret;
                }
        }