From patchwork Fri Mar 23 13:04: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: 10304627 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 5912760386 for ; Fri, 23 Mar 2018 13:06:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A8C728DFB for ; Fri, 23 Mar 2018 13:06:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E90228E5F; Fri, 23 Mar 2018 13:06:10 +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 DD66828DFB for ; Fri, 23 Mar 2018 13:06:09 +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=7voYbN2BxCmh5NBBiO4j4npP9U4SxO6AE8ZRa6UxJSs=; b=F9ZEwcCO6IoF8SoKU8aJPpjK4M k/kCIEBzc2++2PXerqjRHnHEDCiGKtzB1h7SZ9rBu3vga5Yu6PVl3foH1T/sM6iT9DHa2wzfppmuC qrWLAeBtGL7sTMig4N/Ix3SH59HSIRcTNnc1DYK5ZBJJ8RY8in6dKKc/cselWoaH5+JrLNG0jL0yi BPw5YRsBAR2A8JITRHDOUSK0KrbmiADop5MN34rkHsarIT5F/rrzamxxbwuwhtPdN4ku5+9wOgyKk ZMt56zCQnBh65BrwCYhQQ6GEAhYfVabRis8OcV8LTvSij1HOhoLqZns0SiWnZYkMWvwWidG26I6yF eDfTnlrQ==; 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 1ezMOQ-00022e-Ar; Fri, 23 Mar 2018 13:06:02 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ezMNf-0000jS-0b for linux-arm-kernel@lists.infradead.org; Fri, 23 Mar 2018 13:05:20 +0000 Received: by mail-wr0-x241.google.com with SMTP id p53so4542895wrc.10 for ; Fri, 23 Mar 2018 06:05:08 -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=U1TfO8aiHw1+4sjUXHFMzAyxiOYHnHiizDs5ufLc9rY=; b=eFTbw1ivENBYVBUUs3ILyz0lbbQn7Mph1IQPR1GFf6YWROrPVlRwgt2tM0SVntYXcR xSrkkY3uW6J2l+3a6NpBF750/gPMLlsEW8HnFGRSx994bLRcG+exMalV2MEgUccPcZiC ZKh4gWxy3ndfYRhuZZ9Tb1cFhW1WpZXH8XazhbGgqsY1tPBMLPkls1LxMdMSzeAYkktV u/USp+dJtcOIpKUc0eHY7toqGLSKpfH+lFn7+BWLimWTA4+J5SFhbfrYDEHPGyjv2NZ6 CHMQFulCd0qPRHXzejmLfUDjw8gnOHxH5ElNwdZAcxfQ73pL1wwZqWy5giwTNn0bzAI7 yRIw== 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=U1TfO8aiHw1+4sjUXHFMzAyxiOYHnHiizDs5ufLc9rY=; b=MRpS7LauNc8P8oSq2WQkSMXcDMFYBog0dIkFUcTfabHDGcKUTn+kEVXnYj9CCvprEK 3GlvQRLE1qSji7oKnEP8A+87lPDQhe+wZXU2R8D7O1vSA7ePThgsFCF1P5Q9Vv+ZoEJL x0z4HVZTmB7UewGGj975OgCK5Vk88U8DwYRKuImMhkQcMvXe08vcId4F5U+k/kJgdobH 88PG2Eh8FYJbWF6m8jYzWcQh0H8XMymIl0yhbHvCpCtROOYu65pHuYI857ZpczHmGqqr bPMkRzBMY99OW6YGu35cFSj+MtVbDGY67aUrdTcx6KcQcT5qUH+uUAEPlJ6/d5za8mb/ oVhg== X-Gm-Message-State: AElRT7EQ7hMO6ewsD78VrWB8NSzIIXXALRHM7ePGmNxAt/7D64k+k3no lJMloCc64fmV7lJ1EVEBn1CCig== X-Google-Smtp-Source: AG47ELuyIYt1a7L+Le1gC0Czh6f+MaN2HDnC2jcpJUJMCCE2xWXguswFEH+fZYVA+q4cxWnJsXTO0Q== X-Received: by 10.223.185.73 with SMTP id b9mr22988941wrg.229.1521810307352; Fri, 23 Mar 2018 06:05:07 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-1-7086-217.w90-116.abo.wanadoo.fr. [90.116.254.217]) by smtp.gmail.com with ESMTPSA id x67sm7069964wma.5.2018.03.23.06.05.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 06:05:06 -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 v4 5/8] remoteproc: da8xx: add the missing retval check for clk_enable() Date: Fri, 23 Mar 2018 14:04:52 +0100 Message-Id: <20180323130455.11470-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180323130455.11470-1-brgl@bgdev.pl> References: <20180323130455.11470-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180323_060515_235753_31E5D642 X-CRM114-Status: GOOD ( 15.98 ) 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;