diff mbox

[v1] clk: palmas: undo preparation of a clock source.

Message ID 1493384587-32659-1-git-send-email-arvind.yadav.cs@gmail.com (mailing list archive)
State Accepted
Delegated to: Stephen Boyd
Headers show

Commit Message

Arvind Yadav April 28, 2017, 1:03 p.m. UTC
Undo preparation of a clock source, if palmas_clks_init_configure is not
successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/clk/clk-palmas.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stephen Boyd June 2, 2017, 5:49 p.m. UTC | #1
On 04/28, Arvind Yadav wrote:
> Undo preparation of a clock source, if palmas_clks_init_configure is not
> successful.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---

Applied to clk-next
diff mbox

Patch

diff --git a/drivers/clk/clk-palmas.c b/drivers/clk/clk-palmas.c
index 31f590c..7f51c01 100644
--- a/drivers/clk/clk-palmas.c
+++ b/drivers/clk/clk-palmas.c
@@ -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;
 		}
 	}