From patchwork Tue Apr 17 17:30:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10346147 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 6F9CE60216 for ; Tue, 17 Apr 2018 17:32:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F942285C4 for ; Tue, 17 Apr 2018 17:32:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53A1D285C7; Tue, 17 Apr 2018 17:32:09 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI 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 C6344285C4 for ; Tue, 17 Apr 2018 17:32:08 +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=ATzadRFYdOAoMhOiAd1SdkboyafN++UdmI9EaDIrjiU=; b=NHH+vDMPqOPVnYHWZ2WmrWX4Je cxyYo7Aqr9cBQo+s+Y32HdmD8XxEdnhtyvzDKBNnxN9Hj7+q29qdD73wSEfgLOPYkuMaHG88RjZv5 cdUeMO0g4WZH3tKcqNGlryOTsa5XtLbIL6CIj2NpLq0/sQOOb39W8JFVrKW3qlj9OLAzrfChj03hs VobikWpjsXDdpg+Ayh3gwzkhlj4G6fkaFcAMiwUVMXBXogwQ9rC0Vq1Rw9r/TBFEcCbeNV27p59QM RCAnuVlvRZ9ZIqmaB1u5jj4OVKoh+cVvstigkYuD5Yehc7FYC7MqmX4z1Mevcut0ky+Wixj5g2Ita og+8OSvQ==; 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 1f8USS-0006mA-4Z; Tue, 17 Apr 2018 17:31:56 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8URW-0006PX-EF for linux-arm-kernel@lists.infradead.org; Tue, 17 Apr 2018 17:31:02 +0000 Received: by mail-wr0-x243.google.com with SMTP id d19so37731925wre.1 for ; Tue, 17 Apr 2018 10:30:51 -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=Z728Q3EWIrNf2r0HWm0QHZt40+dS9fD2L9EE+KxrzVE=; b=DxsDEC2mFN98MknSvB+NcYrzywjQdDkb7tXlonfnRT4kydFuvNhOXfK3FoisWvweor T3XBvMT//ihRWi82ClbN7IZ/7ydQjhsNJGVHkaEj4ZpzJm2NXRtMF0EXZWShO4AIq0Vf GnQWTbre/PvEFnuM7sIc/GnNAMBY9E34dlRfK+cKEFHApwbO82rsQxNIimTopInxmIr4 kVpUOqcNYa5Eiz44+jprjw/rFUUx5mbth2uWU2XePqPSg2X7zxiCKoDZNyg5gY/PtktR uUN/nHV/l4P6/hTtiv3wzg8jMg/Vfx8YQpU1UxVd957AF3ceh3kTjJEKoPdSAzbzrUF3 8NBA== 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=Z728Q3EWIrNf2r0HWm0QHZt40+dS9fD2L9EE+KxrzVE=; b=GZqgpm6nyp2fatGm4gFBXAikRy+TEaqhu1ScmMrrHT1QIoo/xpLNX2bhLU/F+nTjio ENcK/Pl5TpwjZ2KaUwe8ECU42qRmyYSIUlsR6B7zhcCnoyMIOlH+p1FdZ0OuZyDs50tY cd6sA9I7o0jhfjkYMU8co05Ol206ZHRS+OFi7VvdaNkxkmCmtDVi1UDyeARBglnQlR63 0J76cE4RFMq9yTRCcYJXmpLULcdkAXIMHV/rjWCbrHvqIXF+oOgCBiJFpmEb+zh2JzFX NtwV7RYkuKlDanVxduF9+0uJT2eFtSKtzEAFaia+ZXvAn846DxiKYl0/IV8/mKJwVeow uBAA== X-Gm-Message-State: ALQs6tD1TOGdYdBW1TFg+sthIeqPy6BSlIOIVtqMDAwj97whjrmA8NwU eSOivEmB/2MOPoXubZkA6t6cog== X-Google-Smtp-Source: AIpwx4+cTMwEB1akfOY3BXebrsAcwL796TubGhUtohtexBQcsZS6sOX1j1Y2EOFrevimWA/U4eO58g== X-Received: by 10.28.69.93 with SMTP id s90mr1649701wma.71.1523986249855; Tue, 17 Apr 2018 10:30:49 -0700 (PDT) Received: from brgl-bgdev.home ([2a01:cb1d:af:5b00:e837:b8d5:48c1:571b]) by smtp.gmail.com with ESMTPSA id b47sm14042341wrg.13.2018.04.17.10.30.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 10:30:49 -0700 (PDT) From: Bartosz Golaszewski To: Suman Anna , 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 v6 3/7] remoteproc/davinci: add the missing retval check for clk_enable() Date: Tue, 17 Apr 2018 19:30:34 +0200 Message-Id: <20180417173038.25510-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417173038.25510-1-brgl@bgdev.pl> References: <20180417173038.25510-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180417_103058_540461_BD5AB63A X-CRM114-Status: GOOD ( 16.24 ) 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 Reviewed-by: Sekhar Nori --- 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;