Commit 2310eae9 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Bjorn Andersson

remoteproc/davinci: add the missing retval check for clk_enable()

The davinci platform is being switched to using the common clock
framework, where clk_enable() can fail. Add the return value check.
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: default avatarSuman Anna <s-anna@ti.com>
Reviewed-by: default avatarDavid Lechner <david@lechnology.com>
Reviewed-by: default avatarSekhar Nori <nsekhar@ti.com>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 9935448e
...@@ -138,6 +138,7 @@ static int da8xx_rproc_start(struct rproc *rproc) ...@@ -138,6 +138,7 @@ static int da8xx_rproc_start(struct rproc *rproc)
struct device *dev = rproc->dev.parent; struct device *dev = rproc->dev.parent;
struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv; struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv;
struct clk *dsp_clk = drproc->dsp_clk; struct clk *dsp_clk = drproc->dsp_clk;
int ret;
/* hw requires the start (boot) address be on 1KB boundary */ /* hw requires the start (boot) address be on 1KB boundary */
if (rproc->bootaddr & 0x3ff) { if (rproc->bootaddr & 0x3ff) {
...@@ -148,7 +149,12 @@ static int da8xx_rproc_start(struct rproc *rproc) ...@@ -148,7 +149,12 @@ static int da8xx_rproc_start(struct rproc *rproc)
writel(rproc->bootaddr, drproc->bootreg); writel(rproc->bootaddr, drproc->bootreg);
clk_enable(dsp_clk); ret = clk_enable(dsp_clk);
if (ret) {
dev_err(dev, "clk_enable() failed: %d\n", ret);
return ret;
}
davinci_clk_reset_deassert(dsp_clk); davinci_clk_reset_deassert(dsp_clk);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment