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: 10346155 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 C04C960548 for ; Tue, 17 Apr 2018 17:32:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B21B1285C4 for ; Tue, 17 Apr 2018 17:32:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6E5F285C7; Tue, 17 Apr 2018 17:32:32 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DBB5285C5 for ; Tue, 17 Apr 2018 17:32:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752641AbeDQRcR (ORCPT ); Tue, 17 Apr 2018 13:32:17 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:44765 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752831AbeDQRav (ORCPT ); Tue, 17 Apr 2018 13:30:51 -0400 Received: by mail-wr0-f196.google.com with SMTP id o15so6715789wro.11 for ; Tue, 17 Apr 2018 10:30:50 -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=kRi6n9Qomhv0YTQ40YVy1oI3BHsdSAroDhNBVXDSMq2BAf9AsonbvANzbt/MqdWDTC DZmWsf8h1+4FcCwbkmUZbGYMSIsROMj6ITXpn99S9S0EKDyTWuv6eglE2ljvZm0kahmi fRRihsu2+qUtuN37hpoutTopJi2FhzqJtG6+FHumM3l6nJV3RHzegLu+xAq/MKEAnyEb C2wObB0TfqZ8fm1cgdXukJaT/ny3bv55ZnxZZfn6/c/JEJ4Pngy5KWcabpeiKGaSago1 TmlvEr1qKHduDifnJ+HcRLf5ojrrYMMNUNY9yVUc175lNIJ8+E1D+EKv5ARv0gv+jDZF Rhjg== X-Gm-Message-State: ALQs6tDNXdC7y9hGDx5Zuw1ah8tjQYQOc8h7NXOJp705FIwUsZ3eVEeF 2SjSDhhSGsnymj8p2k1v2Mm66Q== 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 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 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> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.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;