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: 9736899 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 DE518601C2 for ; Fri, 19 May 2017 10:57:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF37D288A9 for ; Fri, 19 May 2017 10:57:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3E05288C4; Fri, 19 May 2017 10:57:55 +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 80100288A9 for ; Fri, 19 May 2017 10:57:55 +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=cJay0iFC1iaEn6ryYn8eNXmZ+yiQFeuRm2qUntvkVgE=; b=Tq2 BgGOP5FBoqDlKSxHoYhoLqCU7e4Itsd/tWGvfgLdB7Q3xmXeTDrfHXCCC5bhxtMKAl/mn0R/sQZD1 nELU6gSADHIFKrdMGaEyWJWfZbYQqjU1BEfpeU1LI22//e/oNlFsJt0EVY/zOOaAFWXzVtKDxi23f iE6Em4LHNJJ+zSddRUSbFeGiwqnSFDhOUHu3ntv2p4BU9LfsjwFhTTLh7Ol1zDF5j3bE5Wfzw6uRK cPJpyonGbkIlZq7wueN6nCs61RlsfAeaJ3l5LaY4sAvhIYEw82Vcu8khoztxkPaua4FOWbnup5Yx3 2w8NTgh+8XiP0Y27m6gDQ6bxftvfbow==; 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 1dBfbW-0006b5-La; Fri, 19 May 2017 10:57:54 +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 1dBfbT-0006PO-IF for linux-arm-kernel@lists.infradead.org; Fri, 19 May 2017 10:57:52 +0000 Received: by mail-pf0-x243.google.com with SMTP id w69so9203308pfk.1 for ; 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=OO8NxB5ae73fs4APbRnjINRsZuyacDQUbu3hrZxLpZWe4rc32yJBMeX8FOnX8rNLK8 F/OWDuxs1U4c1Z8QmTGdFJnh+v/lGUqmKf4B0fB5okQxYA+DVIYmn4dLhLsBVkNjtSru bnQbjUG81tvDpTsbJ+6uEAOTeGrH2+1Wd2aZDQgYhQFGOBE4A6LrzKasd7rUESyFY9g/ ybKgJuO1Ovv+SabRX87jIEP8bW/LQtQmqOWjYmVkDjdvQUSMDRD0wSiA2rBsCoiW3ZPk 7w+xJMKQ6jyc/CS+qj8Cyi1iCbIBuKD52R56EB4082Plrk59fR/0i7AbVTxs4Zc+OPRC XvZg== X-Gm-Message-State: AODbwcDZZExxia9JnJ6Fe3yYz9Zk1KXwGocDO4HiO9rNQoBSV8D9RSS0 Jzs1z1/d95pSbA== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170519_035751_656162_8DE01E2E X-CRM114-Status: GOOD ( 11.09 ) 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: 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; }