From patchwork Tue Mar 27 09:20:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10309655 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 6DF5460212 for ; Tue, 27 Mar 2018 09:23:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B2D729BAB for ; Tue, 27 Mar 2018 09:23:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F5A729C1D; Tue, 27 Mar 2018 09:23:29 +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 B0BA529BAB for ; Tue, 27 Mar 2018 09:23:28 +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=qxB9GMYwdXaV0KLa2PRDDUtowwHOsnp43sh7fTyuWkw=; b=C8sv58CHU3QIEUri77PGgKf806 z2X/T7ExjhQZ7EKUQQ8h+yR5OBFKE3iPyNWKSWOXNv79SylfGntbOsaFo8Se1PdsJpBtyeTMOof3r WCzuIF1FSvVoUA18WPxvhmYyLAQAglEeb9rvDPg70RA//RzEVjB1xUUvF4pn4Mn9UeLUJoEcSNa4l vtIWMWexldONb1c+P67M3Ztf5TLWBhvGv/SuLEvB9gOuEifHSoE2e1N3RYOBZHQUXFilSDqMI57AM fV7ihuMTRnDNarCJE0PFL7mqSNs7k5Q3/niAk2/TsR7HvjaWgwCK8ezaOnaiHXfSswvzyXvhHoFJ2 BkmiTdRw==; 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 1f0kp7-0003WP-1T; Tue, 27 Mar 2018 09:23:21 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0kmg-0001eT-Ce for linux-arm-kernel@lists.infradead.org; Tue, 27 Mar 2018 09:20:53 +0000 Received: by mail-wr0-x242.google.com with SMTP id f14so21624676wre.8 for ; Tue, 27 Mar 2018 02:20:42 -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=GjNGu1a1C6nTUDAr1cwJbdU8qk0eOqfPmLDOO9cSlLo=; b=iot9M+JIsoiZDXKcuUfMHve5IbX5YLJ5zKQhNcdxdubj0zHh7QPrh/DHwyaRTldQj5 DxZJsbomlJIS/jRKvR3Q0GbzT6FwQaZhAjxQbpgQjl41Fs+ZKZKC8FJn/ImMY/tCip1U BNhFR0UwblXYO3JqGBmP2f03zLtnpxEIcCLMb5q0NL9B7sz8HzQHJgKxLpervYkPXASw /4XzLeB9wqfayncFB9KCgJmwT4UVteBOPb4HeneysGyIFhPeiIIhfOmRcp2dk0Sr4zLV m5o23IAhrjeLcGfWI3CAre2VLHbySF8bYudcLdXSBYmGXJ6u2dQiOBPXp/+uuBU0gXmR icJw== 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=GjNGu1a1C6nTUDAr1cwJbdU8qk0eOqfPmLDOO9cSlLo=; b=oOnRhDO7Ct21EUoQ/vx/h/v2fYfyXj7nnwGTLdGxUqE8VFoFyzXAXVN/qiZsGq2n29 0mkK+i6Sblr289H8ARuMrk2I8euzttWF/+kzEzSXclSTUmgfDhLwn+X0Cn9edGtquEUL cKAKs8mKvfSoJiYx+lfyU0puL0zV8ty62PZDVXR2kzbLFX41vbOcTBpzo5dwVIUwMuY2 8m0I2MTSZnusZeVXD6+RFqF6WiDfDd0IEVDSkWmMVqbJrEPUg/A7u2TiRovqjFb8qeIH ygLQJe0Pcwdk384ztKGU024qARy4M+bOiymGrzXeEzkH8WW6FXxkHP2XXMOeoOtj7Dr3 1oqQ== X-Gm-Message-State: AElRT7HtYwvYM6zW9pzU/yL+56xQ9PLq6GZeLElW4HLlc64ku/nDFA66 ohzjHR2d67VEZ1EYl66dUTBZSA== X-Google-Smtp-Source: AG47ELu9vlw6Q3kCFDdLXQtXzh6BniPjRwycnAaHBUVK1rJGFDcEbwws8IEQsOvOFsIi3kkqW6mzYQ== X-Received: by 10.223.143.7 with SMTP id p7mr32391686wrb.207.1522142441019; Tue, 27 Mar 2018 02:20:41 -0700 (PDT) Received: from brgl-bgdev.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id h190sm1288925wmd.22.2018.03.27.02.20.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 02:20:40 -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 v3 4/8] remoteproc/davinci: add the missing retval check for clk_enable() Date: Tue, 27 Mar 2018 11:20:27 +0200 Message-Id: <20180327092031.11251-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180327092031.11251-1-brgl@bgdev.pl> References: <20180327092031.11251-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180327_022050_427473_5A9A5998 X-CRM114-Status: GOOD ( 16.64 ) 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 --- 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;