From patchwork Fri May 19 10:50:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9736881 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 841D9601C2 for ; Fri, 19 May 2017 10:52:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75A1B205F7 for ; Fri, 19 May 2017 10:52:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A45D2865D; Fri, 19 May 2017 10:52:24 +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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 077AB205F7 for ; Fri, 19 May 2017 10:52:24 +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: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:In-Reply-To: References:List-Owner; bh=V2bZ9bx3cu2EsKQbYVDZ9iZlLSgK2ugYuUCdCIDQk0I=; b=QHV +5+wbke7IszLxsFSoa2fb1uhGjeNaHU7GLPHhLOviNqBt+jysCGTSu6NWXHEcJkJPISC6dg9SRib1 IeBFfhMFKCk/PhX2RFDjyBSjv/viAHPH+mM32sDRd36H3QX/JYskHe50QR2ocA+BoY1eK71TXDFb7 AgJhdetT0pVJPfFK/EP7vnC1hrqKyN8FD0RL7CzxupFUwNZH0Fkv57qMCjCCN43QkUmnW6em51Brx GXPzdnK+GzS+3C6lmIVKDo2VGetcz2oGuNiL/ApkqzksizyFqImlsRqT538nuUTere5/re9vTW/Q0 o4BzenAeCe05jiSmv9vj8IRRLwLOWGg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dBfWB-0003bJ-4A; Fri, 19 May 2017 10:52:23 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dBfW8-0003YX-8J for linux-arm-kernel@lists.infradead.org; Fri, 19 May 2017 10:52:21 +0000 Received: by mail-pf0-x243.google.com with SMTP id u26so9195246pfd.2 for ; Fri, 19 May 2017 03:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=NR1xLdme6pHVWIAr5vNTNJgmgbuxsPWDsoW4eqNc0ks=; b=ZW3sB3dBi1EqXS2mJXRli8Mf91NZCS6HtSFJCcTicixkjkiEjhE2O430mZ10T/UE5e p0ETio0JTHHy309Ww2QJULXYpDakPPJ5deSUD2p8jtXBk3fuAL1100xLgMLChMk9nPsS /QiRk5cN2L7PRZwXqDe8C3cI2rs+qxjkgVH1NkLgMrbdTu42LayBXbc7MQDGFCbnAxX7 /zDDqBQUqu2Ya9MsnvHx2z9Zc+ZwXD/A4vFKjsBJX5ToGMJU+xsmAwH56LMn+TJ7RMcE WXyjFl8OnIH7z2Mp0JWWVwfAA9cCft9KcSka4d4dz8QYIcoAegoYD+vVgh/S7giaOMRs amUQ== 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; bh=NR1xLdme6pHVWIAr5vNTNJgmgbuxsPWDsoW4eqNc0ks=; b=MRcKJoiA1/iWeKZNYYxztfLlBJn6x5MF2pqmfU+5QKVrliZ+RbOydRFuiq7c0WT+HI 0DPvde2XkOF3rsRIvTzooWCMcb9INWzAhb7c9S39tAZ6hmAr7vd6BWiZ5tbCnF8jMwGC E13q2qU+vWptBWN597bKwJ1iF4VSdxk6TJ/yLO4L14UblOiJKUOQl2uOcdNcR4Z5UoVO Wi3+uKpmh2zeVMfMe+wyqIn2aNeI5Uun18V5oSF2v202WuKpZVKWXHnOnNDGi7KZG0ps nvdLHkCTX0xDvaLl87NcL04aHbsd9/ynEzAIJi33J8xZgaT5FAepkkg1C14niuMfLHbV 1bnQ== X-Gm-Message-State: AODbwcCkvb8uju2hW+PprDnqW7423S2HEjXi4AzQv4uIz7uz/+slGyh2 aD0G2yqcI7BnuQ== X-Received: by 10.99.127.26 with SMTP id a26mr9551374pgd.75.1495191119041; Fri, 19 May 2017 03:51:59 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id 192sm14070088pfb.10.2017.05.19.03.51.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 May 2017 03:51:58 -0700 (PDT) From: Arvind Yadav To: myungjoo.ham@samsung.com, kyungmin.park@samsung.com, krzk@kernel.org, kgene@kernel.org, javier@osg.samsung.com Subject: [PATCH v1] PM / devfreq: exynos-nocp : Handle return value of clk_prepare_enable Date: Fri, 19 May 2017 16:20:35 +0530 Message-Id: <1495191035-15882-1-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170519_035220_326913_11065EE5 X-CRM114-Status: GOOD ( 10.59 ) 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: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.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 clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Acked-by: Chanwoo Choi --- drivers/devfreq/event/exynos-nocp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c index 5c3e7b1..f6e7956 100644 --- a/drivers/devfreq/event/exynos-nocp.c +++ b/drivers/devfreq/event/exynos-nocp.c @@ -267,7 +267,11 @@ static int exynos_nocp_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, nocp); - clk_prepare_enable(nocp->clk); + ret = clk_prepare_enable(nocp->clk); + if (ret) { + dev_err(&pdev->dev, "failed to prepare ppmu clock\n"); + return ret; + } pr_info("exynos-nocp: new NoC Probe device registered: %s\n", dev_name(dev));