diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2018-05-02 11:56:57 +0200 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-05-09 14:30:34 -0700 |
commit | 2310eae90f26f1cb8039bdfbfe6fe981e9838e80 (patch) | |
tree | cc6598a9f924fc1a7505c22e06bf2bd512466ae0 /drivers/remoteproc | |
parent | 9935448e207cc9e7e5fd3c6aa3282ff503f263c4 (diff) | |
download | linux-stable-2310eae90f26f1cb8039bdfbfe6fe981e9838e80.tar.gz linux-stable-2310eae90f26f1cb8039bdfbfe6fe981e9838e80.tar.bz2 linux-stable-2310eae90f26f1cb8039bdfbfe6fe981e9838e80.zip |
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: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Suman Anna <s-anna@ti.com>
Reviewed-by: David Lechner <david@lechnology.com>
Reviewed-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/da8xx_remoteproc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/remoteproc/da8xx_remoteproc.c b/drivers/remoteproc/da8xx_remoteproc.c index bf3b9034c319..2b24291337b7 100644 --- a/drivers/remoteproc/da8xx_remoteproc.c +++ b/drivers/remoteproc/da8xx_remoteproc.c @@ -138,6 +138,7 @@ static int da8xx_rproc_start(struct rproc *rproc) struct device *dev = rproc->dev.parent; struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv; struct clk *dsp_clk = drproc->dsp_clk; + int ret; /* hw requires the start (boot) address be on 1KB boundary */ if (rproc->bootaddr & 0x3ff) { @@ -148,7 +149,12 @@ static int da8xx_rproc_start(struct rproc *rproc) 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); return 0; |