Received: by 10.213.65.68 with SMTP id h4csp1195997imn; Wed, 21 Mar 2018 05:12:05 -0700 (PDT) X-Google-Smtp-Source: AG47ELs7eQdicUWiavMpYxRUenvY96g3hpipoKtuc8RpWrVBy+D0HUgFJmyNr71eP+7QuE/qMf/z X-Received: by 10.99.134.193 with SMTP id x184mr517279pgd.324.1521634325321; Wed, 21 Mar 2018 05:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521634325; cv=none; d=google.com; s=arc-20160816; b=biZVoJRzvkPoRahDjgJFvsUktCC+HzZ7q1Scs5KuHYA85o5tqCsWK4py7zLkDTbzqk eHBGAmcF3+JxK10D+a7+diJipVAEqfj5PyqnffMERfYaA3oU1mfnQXlQqKK41X5oBuEl DKCkpXqKG9Pn4lv+vgnFSifS8uOQze6EGJtUFsaK39gesobDqhZ9mJEfHFDNfmAQB3Qi 7xLORtwLRKSpXgDXNMjIycSEZfm9i20+Y0T6ANoOniMbXomJqGFX8h+QBTzD3NKkzrM7 ABFpbweVh8PwTd/Dk+eG4JFmFuCFj1HZtXkHQeqrMAPQb88ah/xHirGGdJ6j7mvzDww+ eHRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=/jgc8KvKidUt160wr/sjSOu4TyEA2gVnQ8oAmfrKh/8=; b=LbX1vZXI+KGgy18xQA0Q3e3FaPmhJcMF9aAgl2hVydqSCKds+0VfTUvNRZPfCTe7zY 7OVvm76aaxkLcHRObxTnYa8Q7hwe2q3S2cZQtUZnvSYLw/wOG2g9UiaMTH2huSmIiVq1 rDL6+LH1vPSTiJlAlx7ff+0owNrt25Xz0+d5bPTq3YRdUhBAy900OYIEvVrxb9+EIfmw c8AA+4/jBmBEHCzwgv6uoJqfppPogB84nelC+JJNrs2EdIzKmLX6FrKDYwJCW7NUGWcT 4YPyOF7AwBlm3mCK3g+yDaDteY1sOag0vxOFcHvuFu7T7nD2VlSIGukXopKmHH1jYiEJ S54w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=wPLUZhda; 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 u6-v6si3737836pld.628.2018.03.21.05.11.50; Wed, 21 Mar 2018 05:12:05 -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=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=wPLUZhda; 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 S1752043AbeCUMJ1 (ORCPT + 99 others); Wed, 21 Mar 2018 08:09:27 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:40250 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751736AbeCUMIe (ORCPT ); Wed, 21 Mar 2018 08:08:34 -0400 Received: by mail-wm0-f65.google.com with SMTP id t6so9368454wmt.5 for ; Wed, 21 Mar 2018 05:08:33 -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=/jgc8KvKidUt160wr/sjSOu4TyEA2gVnQ8oAmfrKh/8=; b=wPLUZhdaheg2HN1fK1wWh7KwsoRZE1jG90hfCDzRLKwfXgP4iTM4G7IrKlI+LyxhpZ YTzl4vpXKuKTkFBH7UIFvHmBjIQZ540htC6RrvKrlBgt/4FZwGJSM+T5TtQJnCWZDXOq aG4Yppw+XjhDIeM81P5V8oH716NPuJgIfHV6h6MWES4wyh+8g/bnuKXawwXYxBrU/IeA xvM9aKioLchsAFhycxkTB2vtrqg09kJyFi5DFVt4+KOsUoSoK5pIBZEkmBPJHawt443k VPQWqPOZKdZtlNWNbzsVwrMUmn4VgiTG1CDDDXf4fZrHzHnk+SU85Jtno+OYkWkykciV qn4Q== 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=/jgc8KvKidUt160wr/sjSOu4TyEA2gVnQ8oAmfrKh/8=; b=B5LAkF9XKbJ4r0y0JGeQBxvQ7Ha9H5nZ8lwRoX6gBlH9kQyMDgJTCfGiIiWyxa/hXC 1Fp3VOG0PxLE8bNa3SmZyh+ju66Ofpe1sq06GDv8sRpuXPe2lOY6+iLSp7feqSJwCaAo DXlCaVy1VzljN/Y1HZJ77eavArxBn6iAwDjgBOmf9Q0a8OCCbnxYonYMnA6rdwIDLtdM 6U7fXL9UEyOLApu3ayfk2xQS7puRKU/BA4xDbr5ouOW2E4Rau2LiKwIzo6LQku9S0owe s2X76oGjxmbRA6OuRn28ZIC4QwABBGHLNtrDER5QQ/fBpxk+MeKKsRv1Xun6nA+sGHdj U4Ow== X-Gm-Message-State: AElRT7HFoVEj6bstIWAVDwh1YCblF4v57KOhXrz54Dgi9RzZaFH65d9m e0ms1tnaGWOrhp3klKdXNuaUzQ== X-Received: by 10.28.0.88 with SMTP id 85mr2368014wma.63.1521634113088; Wed, 21 Mar 2018 05:08:33 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-NIC-1-208-99.w2-15.abo.wanadoo.fr. [2.15.55.99]) by smtp.gmail.com with ESMTPSA id 69sm3871018wmp.36.2018.03.21.05.08.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Mar 2018 05:08:32 -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 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 Subject: [PATCH 5/8] remoteproc: da8xx: add the missing checke for clk_enable() Date: Wed, 21 Mar 2018 13:08:04 +0100 Message-Id: <20180321120807.18032-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180321120807.18032-1-brgl@bgdev.pl> References: <20180321120807.18032-1-brgl@bgdev.pl> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; /* 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; -- 2.16.1