From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752130AbeCZVR0 (ORCPT ); Mon, 26 Mar 2018 17:17:26 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:43214 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751692AbeCZVRU (ORCPT ); Mon, 26 Mar 2018 17:17:20 -0400 Subject: Re: [PATCH v4 5/8] remoteproc: da8xx: add the missing retval check for clk_enable() To: Bartosz Golaszewski , Sekhar Nori , Kevin Hilman , Rob Herring , Mark Rutland , Russell King , David Lechner , Michael Turquette , Stephen Boyd , Ohad Ben-Cohen , Bjorn Andersson , Philipp Zabel CC: , , , Bartosz Golaszewski , , References: <20180323130455.11470-1-brgl@bgdev.pl> <20180323130455.11470-6-brgl@bgdev.pl> From: Suman Anna Message-ID: Date: Mon, 26 Mar 2018 16:15:57 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180323130455.11470-6-brgl@bgdev.pl> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/23/2018 08:04 AM, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > 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 This patch can be applied agnostic of the CCF change as well. I had been using "remoteproc/davinci: ..." on the patch subject for all davinci remoteproc patches. So prefer to maintain the same. With that, Acked-by: Suman Anna regards Suman > --- > drivers/remoteproc/da8xx_remoteproc.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > 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; >