From patchwork Thu Aug 28 05:52:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 4792701 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AB25B9F38D for ; Thu, 28 Aug 2014 05:53:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E294C20145 for ; Thu, 28 Aug 2014 05:53:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD3DF2015A for ; Thu, 28 Aug 2014 05:53:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933148AbaH1FxB (ORCPT ); Thu, 28 Aug 2014 01:53:01 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:32833 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933992AbaH1FxB (ORCPT ); Thu, 28 Aug 2014 01:53:01 -0400 Received: by mail-pa0-f48.google.com with SMTP id ey11so1110624pad.35 for ; Wed, 27 Aug 2014 22:53:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=UH2qLBckWZUm/9wLKdCHYftMJ50gq6O9qI2Tk1n7Jlw=; b=m0GTmLbhaYjlOL+TQrOXsUqclcMyepUEFCEqLaZo65yW5ksLq1h2H6mMTk4hk7WMka j1nUnLzMAloE4vIKp2nPEa7Iv3RK6Mz1cNQScwOeCrdxBLl1WO9y6M4xjysLMvA1HFGd MaoD6icKZ744qL54p/D0tJldYuVEIKgb+v7YgCAyLNP5behtzyiAsYjyM6UWnNLzD3Bz mkCqWm13z5DlKGIzPwXEQ6NBaieAEd85sxt25AxLIvJ5iIxvBOWFcsbRP7C8/rKWdwa8 K9+ktIgOboSakKo25ChjT0f6G78mD2evw24dTBfSeEA2PiyWkDMp73ZW6HIsZvBU0YR9 c0eg== X-Gm-Message-State: ALoCoQl6vGYMFE5FG8Ui02UV370YDTEHsc1czVbfWMtBAjZ+C15X8xlbdx+6LzJXTyjNPkwc/gAN X-Received: by 10.68.143.100 with SMTP id sd4mr2445658pbb.76.1409205180748; Wed, 27 Aug 2014 22:53:00 -0700 (PDT) Received: from localhost ([122.167.123.172]) by mx.google.com with ESMTPSA id du5sm2289728pbb.80.2014.08.27.22.52.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 27 Aug 2014 22:53:00 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, shawn.guo@linaro.org, sboyd@codeaurora.org, linux-arm-msm@vger.kernel.org, spk.linux@gmail.com, thomas.ab@samsung.com, t.figa@samsung.com, santosh.shilimkar@ti.com, thomas.petazzoni@free-electrons.com, pramod.gurav@smartplayin.com, Viresh Kumar Subject: [PATCH V3 03/10] cpufreq: cpu0: don't validate clock on clk_put() Date: Thu, 28 Aug 2014 11:22:25 +0530 Message-Id: <4f6f0b21db83466aef5569fddcef76a3c9b7dc5a.1409201048.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP CPU clk is not optional for this driver and probe would fail if it couldn't find a suitable clock. And so, while calling clk_put() we don't need to validate clocks. Acked-by: Santosh Shilimkar Tested-by: Stephen Boyd Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq-cpu0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index 4cfde63..d2dc921 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -217,8 +217,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev) out_free_table: dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); out_put_clk: - if (!IS_ERR(cpu_clk)) - clk_put(cpu_clk); + clk_put(cpu_clk); out_put_reg: if (!IS_ERR(cpu_reg)) regulator_put(cpu_reg);