From patchwork Tue Jul 1 16:32:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 32911 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 31AA020672 for ; Tue, 1 Jul 2014 16:34:30 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id uz6sf59798223obc.0 for ; Tue, 01 Jul 2014 09:34:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=HdUi3iFeIhSlAjzGh+LJQej7ejqoVZ1vK68dZLOIoy0=; b=eR6/0dfluW46oC1zZX1AUtLHXZKySZVyyuD/94uvs+aPRd8rJPs9NT3i8NyASg5g/K /mqqcBc4r1E2qWYamDmpsXkGdvMq8WpvQKlN/ymfLBijM0PMwtt6U4S9e58fl04nRQxl 24CHredcFJnImfK1mZP0IbOjWIU4aOoJFjmvapCzWPqcZeLYoiuRLdDcPNos/TKmCYFN E4163l94QQemLyUhRiD2R4SIYTDbz5TEFlOp9B16KWNIGbYKDsFVmx8t0pNztWzTVLE1 6c+d0kE1xB9c7M51njv8LY5A3Dwezu/tnVagzquojvWVzSz2k6YQpQuRPiji1Vp7dbjB 9eWQ== X-Gm-Message-State: ALoCoQkSnhht+nAFkoUn++dyM2YF45lvClDW4jWEI+JIIb0+1LRPRysc9jFTabgX0U6MnAx6n+Ga X-Received: by 10.43.12.67 with SMTP id ph3mr23805559icb.28.1404232469680; Tue, 01 Jul 2014 09:34:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.139 with SMTP id f11ls2170779qgf.87.gmail; Tue, 01 Jul 2014 09:34:29 -0700 (PDT) X-Received: by 10.58.34.169 with SMTP id a9mr21160378vej.5.1404232469568; Tue, 01 Jul 2014 09:34:29 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id un15si11646676veb.69.2014.07.01.09.34.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Jul 2014 09:34:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 as permitted sender) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id jz11so9889480veb.2 for ; Tue, 01 Jul 2014 09:34:29 -0700 (PDT) X-Received: by 10.58.69.76 with SMTP id c12mr1553057veu.35.1404232469481; Tue, 01 Jul 2014 09:34:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp228326vcb; Tue, 1 Jul 2014 09:34:29 -0700 (PDT) X-Received: by 10.66.226.172 with SMTP id rt12mr1832408pac.101.1404232468701; Tue, 01 Jul 2014 09:34:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fo3si27545983pbb.76.2014.07.01.09.34.28; Tue, 01 Jul 2014 09:34:28 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758425AbaGAQeS (ORCPT + 27 others); Tue, 1 Jul 2014 12:34:18 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:56712 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758407AbaGAQeO (ORCPT ); Tue, 1 Jul 2014 12:34:14 -0400 Received: by mail-pd0-f175.google.com with SMTP id v10so10334848pde.6 for ; Tue, 01 Jul 2014 09:34:13 -0700 (PDT) X-Received: by 10.68.135.42 with SMTP id pp10mr62711826pbb.58.1404232453750; Tue, 01 Jul 2014 09:34:13 -0700 (PDT) Received: from localhost ([122.166.172.22]) by mx.google.com with ESMTPSA id mt1sm33435733pbb.31.2014.07.01.09.34.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 01 Jul 2014 09:34:13 -0700 (PDT) From: Viresh Kumar To: rjw@rjwysocki.net, shawn.guo@linaro.org Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, arvind.chauhan@arm.com, sboyd@codeaurora.org, linux-arm-msm@vger.kernel.org, spk.linux@gmail.com, thomas.ab@samsung.com, nm@ti.com, t.figa@samsung.com, Viresh Kumar Subject: [PATCH 05/14] cpufreq: cpu0: don't validate clock on clk_put() Date: Tue, 1 Jul 2014 22:02:34 +0530 Message-Id: X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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. Signed-off-by: Viresh Kumar Acked-by: Santosh Shilimkar --- 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 7e191db..4273a5f 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -220,8 +220,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);