From b5368bdd16b7e4fc9e042d15fdc945c90e6e298a Mon Sep 17 00:00:00 2001 From: Miguel Vadillo Date: Thu, 26 Jan 2012 19:39:59 -0600 Subject: rpmsg: resmgr: disable aux_clk_src in case of error If set_rate of aux_clk failed aux_clk_src was being left enabled affecting the core OFF, fix the same. Also avoid changing the return value of clk_set_rate. Change-Id: I897d0669b43bf75ae49e9119ebfadf531bd585d5 Reported-by: Huzefa Kankroliwala Reported-by: Nishanth Menon Signed-off-by: Miguel Vadillo --- drivers/rpmsg/rpmsg_resmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/rpmsg/rpmsg_resmgr.c b/drivers/rpmsg/rpmsg_resmgr.c index a13094d..c98a1b9 100644 --- a/drivers/rpmsg/rpmsg_resmgr.c +++ b/drivers/rpmsg/rpmsg_resmgr.c @@ -214,7 +214,6 @@ static int rprm_auxclk_request(struct rprm_elem *e, struct rprm_auxclk *obj) if (ret) { pr_err("%s: rate not supported by %s\n", __func__, clk_src_name[obj->parent_src_clk]); - ret = -EINVAL; goto error_aux_src_parent; } @@ -236,7 +235,7 @@ static int rprm_auxclk_request(struct rprm_elem *e, struct rprm_auxclk *obj) ret = clk_set_rate(acd->aux_clk, (obj->clk_rate * MHZ)); if (ret) { pr_err("%s: rate not supported by %s\n", __func__, clk_name); - goto error_aux_src_parent; + goto error_aux_enable; } ret = clk_enable(acd->aux_clk); -- cgit v1.1