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: 9736875 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 BC71F601C2 for ; Fri, 19 May 2017 10:52:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE7DF2889B for ; Fri, 19 May 2017 10:52:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2EA8288C4; Fri, 19 May 2017 10:52:02 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 36AA92889B for ; Fri, 19 May 2017 10:52:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752189AbdESKwA (ORCPT ); Fri, 19 May 2017 06:52:00 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33025 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260AbdESKv7 (ORCPT ); Fri, 19 May 2017 06:51:59 -0400 Received: by mail-pf0-f194.google.com with SMTP id f27so9196955pfe.0; 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=D2h57WiaozCKJfaDb4ZOwFf3BV3j7bX8U5ksmGAfkQZpA28iMgR8MVILuCp2UavDg7 NY5+aCwn7H1wBmj7ti4GR6SlsQ426/VaR6Fs6OyNMOtGPR//PbBkOWZWZ5/RKvfoesPh 2hFQ6rfZ5qWmPSoNpuO3caBjk69uV1u7ZMDutQodrdk5PzVCsZYSh9khZ4GJzzVHBjLJ 9MBttLsFHUT3v7DLr74l9H+cp5d8hXxA2DVFpak0/Yzvjnx5KgzsOsOGMUiyoFZOFopR zlbmqFlLFVMBg1f65mz5mwrNhqxasUQYHq7bE4ZIlF5kphBz2BAFnqv7BRA2gKGpC31V afjA== X-Gm-Message-State: AODbwcAEYWQl7Kh2aiMTC+ADBORqd+bsTXVz/zbh53fJwCX2wVapryxh 9CBCMBaLEAGqpQ== 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 Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org 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 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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));