From patchwork Fri May 19 10:56:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9736891 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 48459601C2 for ; Fri, 19 May 2017 10:57:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 388DB2889B for ; Fri, 19 May 2017 10:57:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B9C8288AD; Fri, 19 May 2017 10:57:34 +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 BBD0E2889B for ; Fri, 19 May 2017 10:57:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752684AbdESK5c (ORCPT ); Fri, 19 May 2017 06:57:32 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35093 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752320AbdESK5b (ORCPT ); Fri, 19 May 2017 06:57:31 -0400 Received: by mail-pf0-f196.google.com with SMTP id u26so9209186pfd.2; Fri, 19 May 2017 03:57:31 -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=j+SJrNnfbZ3+zvWQ+872pYb+b2qVpoXIjVMEzdoh/CM=; b=IAXqP61q13Prl6tUHxSbXOfLV70akCI5QgLKTGYbk4yl9malDAhn7T+nOjJ9CyXsMP 74ygSJQyWhfTJycQopbWmHZo9/jCQrE01gB3AyRS1n+le6rsYCL45j1hozfMaO56BbUO LZcOZkfSWy+oev7rYnTs+SACo/Wg9HC1GdVHcUnFV3RbZi1zEakuAwV30z0IVYY/tEV/ vSs0RB63Z3BJpacUDSii+AR9sdUpC1SAyBQzlp9jtXTiLL+gUTjIzSwO2ZgsTO5bMPAy xGx9RIzsYJnSGtXGDvaJDR+KI7WoZd+05vdrmJ/Yv1NH7mCeVlD1yXVaii4DeRiDmmfB +0jQ== 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=j+SJrNnfbZ3+zvWQ+872pYb+b2qVpoXIjVMEzdoh/CM=; b=YXXcDJgxsRfJKJutY4OeWQRWn6S4IcFRGNd/GOScs0E4agf9PlfbbKHfNz04lAqyZ5 k6ZmmLEb4dj0FfE/9+BuloT7u+o/rA0fogTVIvjb7ZmT/SirAif6pX6VYYOpGyEx7qN/ WprB10G0UTvGCqL+naKlyn2+zjmhrNjtK6f74kA0YXKyojjPtxSTPPNH9jfZTIL7R6Pl K2CQ/v8h9i07yh7uZ+trFxOLGOB0rF51Ks19XQBURm2X9Q+GCPMhqHLepumP8P2ffXsF nm1s4hPhxnR2v9H1jL6ftzNzHT9J6FWg5B+j6YT6tFLxI/L2yyzNlsMe4Q5SfNPi3vbQ NDBA== X-Gm-Message-State: AODbwcCg5/nhc8hsVpy4gPYKr/0jEA4TCNEHcuegKNNTxq6gUJXjrX6i KE5RZDmR0EPzwg== X-Received: by 10.84.238.9 with SMTP id u9mr10635401plk.126.1495191450975; Fri, 19 May 2017 03:57:30 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id k8sm16439834pgp.59.2017.05.19.03.57.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 May 2017 03:57:30 -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-ppmu : Handle return value of clk_prepare_enable Date: Fri, 19 May 2017 16:26:04 +0530 Message-Id: <1495191364-16015-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: MyungJoo Ham Acked-by: Chanwoo Choi --- drivers/devfreq/event/exynos-ppmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index 9b73509..8f6537a 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c @@ -648,7 +648,11 @@ static int exynos_ppmu_probe(struct platform_device *pdev) dev_name(&pdev->dev), desc[i].name); } - clk_prepare_enable(info->ppmu.clk); + ret = clk_prepare_enable(info->ppmu.clk); + if (ret) { + dev_err(&pdev->dev, "failed to prepare ppmu clock\n"); + return ret; + } return 0; }