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: 4460711 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 3AE739F358 for ; Tue, 1 Jul 2014 16:38:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C5E5203FB for ; Tue, 1 Jul 2014 16:38:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A48DE20411 for ; Tue, 1 Jul 2014 16:38:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758413AbaGAQeR (ORCPT ); Tue, 1 Jul 2014 12:34:17 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:53684 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758405AbaGAQeO (ORCPT ); Tue, 1 Jul 2014 12:34:14 -0400 Received: by mail-pd0-f181.google.com with SMTP id v10so10404002pde.40 for ; Tue, 01 Jul 2014 09:34:13 -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=1mQ8U9NfCMyKv44ZiIT7E9qBXEVW6h2uDGuVq0WIueE=; b=dvS16hdS+wJTdGa4mnyGiLnm24ZMzxioyUQMdLUfx85a/w8fpfWb4skh0euZPnYU6A KtRm39yPFJGh7nf50MwJguaTVkS9w/LeU+QTtOfBi+LdXFQUel7QH/GF+goam/6HZMiA loCZRUP0uIu7kvp29ykewYNK6L1gcpjAu+IPSo8LOTRdwg/xNm7+D9U8KviVy2qOZdVE 9H1AeNPEixkqj1jj/P7JJTCaHkHkKvQXEeA44SN3rqOTdEZd13QibdWwZGB+PLvkZi91 yLGiBn7YmjQrk5DTkaErfuhDnl1lzk1Bl+F9jotlvdgZ+FeSY2T9hIMUClf11xtZpvAT eLkQ== X-Gm-Message-State: ALoCoQn8XllwO2CTawat3ya7lkdPIjOaw6W740V7bb39deh8ueeTCRfVTCAV0vaWbfNtpluT+WwR 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-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, T_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. 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);