From patchwork Fri Mar 30 15:28:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10317933 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 160E660383 for ; Fri, 30 Mar 2018 15:34:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05F502A30F for ; Fri, 30 Mar 2018 15:34:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEAD12A5DC; Fri, 30 Mar 2018 15:34:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7F0012A30F for ; Fri, 30 Mar 2018 15:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=q9nYpTc1Bm4Dz2Oq8f7gusrgQDhAkvZZX4Ni0Txb/XI=; b=dL0pIyWM3N7uBJRNcHSghCHOvf WmQNOoGbzavMJKfcXotek2ZvGAam69CId6yxYtF61k8QOPwvnRSaSD4KHynjCeXAqNN3TVM2QYN33 EhJ+dycTQhr7NDnq/v9tj87AZRuf9ViDiHlc9V3Tb43qYIZ5pnJHwXyzTocfL0UKyMh/biIeswQjf W2KGTuZNexpHlAOqu0CkZloXsX5vxNS6yD3ajdzpCiOrK/xnLkSA/Hql6r1zmHH2MV3ZBirrtoxUQ xZ8agBMVvqMktnuW4jIWsIS2xnMxXFesC76k2BIXzAqzgwMaEt9Jed9JdIfW69xxLKbd9KiSWYHKW rEpdketg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f1w2I-000740-79; Fri, 30 Mar 2018 15:33:50 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f1vxt-0003YN-9v for linux-arm-kernel@lists.infradead.org; Fri, 30 Mar 2018 15:29:18 +0000 Received: by mail-wm0-x241.google.com with SMTP id f125so17251320wme.4 for ; Fri, 30 Mar 2018 08:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=I8pGhEjfAxAfF2CZaXKXR4H2MjLvLZ4lynYaksKe5YI=; b=DuRubhNLZg6r4W3N99lNgtEch5xixnDwe3juqCf66qH2B2E1KO/1AqwHQYtNwOZ7Lp Av9pVJBsWjDUM1cO+09HlqwwTwVXkG657izUgNtV756OgkU2/fJpPaZ2g5OOopyx4TxT XyKhiCAVVXNtp4ncpkhGpXGOpcb9YQQlY3IduvX/ooeBSWq4xOk+uyNTO3kr6MwU5m2y +SgPxPRIudJ8RQqrvwlgVCWeuYTF8DsezgUalrU5aICIlNK/aTm3+Qk0849Y2iLuKEY+ mD/Jjilc5n2RfGA1atL/FrL3iVezql6pAYnc8215BkC6cnw8VpZ+o26GSvlJHcNav5nG 8dgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=I8pGhEjfAxAfF2CZaXKXR4H2MjLvLZ4lynYaksKe5YI=; b=QxicInpNJJm0yu/fBvRm1aqxerRhis4Z91PTfPkpYQY9TWnqq2z4CQM8OJtkfcf7fn BBy6Q7sFMQ8dG1Cu7eCXihqPj9JxPJ7c1Xjb4kGl8k9PguTC3G4btoIq6Z9EIlAEIoZW xad190slDwDc5Y9uDnqz7qc0WxqoA6dsc7kAZ0Pk75YbGx41biYl86g3VrHxBexKaCyk 8Ozwm6t+E+5Y/YQNs8X80hfGgJ8WtE2NYudWW50Nz21UV/3LvmMSB8GwYNNlpqDEMocT X1kZhNGNBQgXuSAV2u+ub0oXzDUGPOShseE5s93V5jFgQONMbopKDRMod6Cra8OQ30Cq WbIw== X-Gm-Message-State: AElRT7Ft05kHK60YXxzvTW4HZjYWL2/xJhvHLPa6apsx7uZPkiJhVt85 heMX7pa+Zw1pk5jCMIUfJP1cWA== X-Google-Smtp-Source: AIpwx4+786dOm9dN+pQK2woKBujJP+y8tk5dbCuN/pATcEZSDFIIIy02O4JTK2EYj2SieiY+E9VUpQ== X-Received: by 10.28.177.215 with SMTP id a206mr2567249wmf.142.1522423745689; Fri, 30 Mar 2018 08:29:05 -0700 (PDT) Received: from brgl-bgdev.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id n49sm14429881wrn.90.2018.03.30.08.29.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Mar 2018 08:29:05 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Rob Herring , Mark Rutland , Russell King , David Lechner , Michael Turquette , Stephen Boyd , Ohad Ben-Cohen , Bjorn Andersson , Philipp Zabel Subject: [PATCH v5 4/8] remoteproc/davinci: add the missing retval check for clk_enable() Date: Fri, 30 Mar 2018 17:28:52 +0200 Message-Id: <20180330152856.12297-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180330152856.12297-1-brgl@bgdev.pl> References: <20180330152856.12297-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180330_082917_349428_80A99A26 X-CRM114-Status: GOOD ( 16.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Suman Anna Reviewed-by: David Lechner --- 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;