Received: by 10.213.65.68 with SMTP id h4csp1384648imn; Wed, 21 Mar 2018 09:22:14 -0700 (PDT) X-Google-Smtp-Source: AG47ELvYSo7xQiGf+qsONbQmiOmLHFLvWSnOXJM0yFGU258hzx41qcUQxmQel1UwkS3YR5+yUqTW X-Received: by 10.167.131.199 with SMTP id j7mr17205825pfn.99.1521649334102; Wed, 21 Mar 2018 09:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521649334; cv=none; d=google.com; s=arc-20160816; b=Yxn1wJEYwLRc/lZh5nRP5XbXYia+8iNMmNRnNAmC8q1vp5qekRHR/MVVBqFiGVnC0b kd89hhE1GFC5Y2Mn3G/7vQaMhCjoSKvZ4tWmX5yMxQ/bzJNOweaV+KygraDifJNTdIji ephYZu6DHAei7i80bLQns1eacHDhk9KyVIwywcirs1KoTy0M8y7p4nTNRUtytlAiIj2j Xa4mQ9vFaUVRwk4bahrZjIWBseGbceasMUdCUih5mzH3fUMuRLHAlSTyslo8We2Uk7EQ gypy1asKmdVdIhXc7GpenhBDR6lRz8XXIgdxAy0vITLLgB7rdm49LBK3ng2+/ntFR7OL p8xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=isR5R9oEUbghv4JOMwBz/Wp8++G0jjgy+8Zgu0AKRhU=; b=U9Ma/wPZUbw2lV+/LEP3MyOeQXXBBF5hrGLzOb4xhoQZv1QPraFFK+sEwA+Fd4rQug GyzNRHWGXF++UUxKUsa5gfOuLWHJqzXs6aaB+xrTmaAHcGxq6cLn2jvq3HWXsvng8SJu GnBpPgTRqizfWKbDjV0f7Lif4YNi5ajBL8W/PcrSNPavDlurm/dgaInBd8qHV6sbQuc+ WY9LSLBENjfk2GKEGupouB41Eh/toSAfb4mMgOf9rnhVjtw3qRQrSZUOSYDrcuDaUYih fcFr+ZK22izty5DAmC6PunsaWxfTCq+Zmm6sBLol8cO73RMXoPPcSZLvz9dG3Gq+KSV2 cmnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=lCh2ozyh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u24si3266430pfd.282.2018.03.21.09.21.59; Wed, 21 Mar 2018 09:22:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=lCh2ozyh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751901AbeCUQVH (ORCPT + 99 others); Wed, 21 Mar 2018 12:21:07 -0400 Received: from vern.gendns.com ([206.190.152.46]:35596 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751594AbeCUQVE (ORCPT ); Wed, 21 Mar 2018 12:21:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=isR5R9oEUbghv4JOMwBz/Wp8++G0jjgy+8Zgu0AKRhU=; b=lCh2ozyhFDWmCmTLY7+oaWEF34 7+G49zuVLNODcUFIdekmG1r0VN2B7jLDi35X3xt4Isn3wXRxFt4Nw0+JA+TSDn8i4bOj6p/klKecZ QCPaECcHfV/UigQAxZrjwashHF02BZewFt1aaWk5+kxVOVxt0mh4UnuYzUb4iLwdg3sQWtelwWSmS 0ulK18M+4Rw3nbTvAnN2AG6tfZ/fZqnrs+z8Pq2wPizZpUcF1hTJXAEO0hVnC4R/voiDY1Vaf4sor bJJ2pssWksFLRxCTUUDod2d4BDPEzkt2WYTg3tW0qLX2oCGJgMTzn0NFdTKMV9jRZRZUH8xfN+tzL UhuUoMiQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:59224 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1eygRw-002afU-RE; Wed, 21 Mar 2018 12:18:53 -0400 Subject: Re: [PATCH 5/8] remoteproc: da8xx: add the missing checke for clk_enable() To: Bartosz Golaszewski , Sekhar Nori , Kevin Hilman , Rob Herring , Mark Rutland , Russell King , Michael Turquette , Stephen Boyd , Ohad Ben-Cohen , Bjorn Andersson , Philipp Zabel Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-remoteproc@vger.kernel.org, Bartosz Golaszewski References: <20180321120807.18032-1-brgl@bgdev.pl> <20180321120807.18032-6-brgl@bgdev.pl> From: David Lechner Message-ID: Date: Wed, 21 Mar 2018 11:21:04 -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: <20180321120807.18032-6-brgl@bgdev.pl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/21/2018 07:08 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 > --- > 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..592bf0fc52e8 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 rv; For style points, you could use ret instead of rv to be consistent with the rest of this driver. > > /* 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); > + rv = clk_enable(dsp_clk); > + if (rv) { > + dev_err(dev, "clk_enable() failed: %d\n", rv); > + return rv; > + } > + > davinci_clk_reset_deassert(dsp_clk); > > return 0; >