From patchwork Wed Mar 9 14:02:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naga Chumbalkar X-Patchwork-Id: 621411 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p29E2qa2001582 for ; Wed, 9 Mar 2011 14:02:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932208Ab1CIOCv (ORCPT ); Wed, 9 Mar 2011 09:02:51 -0500 Received: from g6t0184.atlanta.hp.com ([15.193.32.61]:6819 "EHLO g6t0184.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932340Ab1CIOCu (ORCPT ); Wed, 9 Mar 2011 09:02:50 -0500 Received: from g5t0030.atlanta.hp.com (g5t0030.atlanta.hp.com [16.228.8.142]) by g6t0184.atlanta.hp.com (Postfix) with ESMTP id 78AE4C875; Wed, 9 Mar 2011 14:02:49 +0000 (UTC) Received: from nchumbalkar.americas.hpqcorp.net (unknown [16.84.209.17]) by g5t0030.atlanta.hp.com (Postfix) with ESMTP id 3C6ED14067; Wed, 9 Mar 2011 14:02:49 +0000 (UTC) From: Naga Chumbalkar To: Dave Jones Cc: linux-acpi@vger.kernel.org, Naga Chumbalkar , cpufreq@vger.kernel.org Message-Id: <20110309135906.6554.54389.sendpatchset@nchumbalkar.americas.hpqcorp.net> Subject: [PATCH]: cpufreq: pcc-cpufreq: don't load driver if get_freq fails during init. Date: Wed, 9 Mar 2011 14:02:49 +0000 (UTC) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 09 Mar 2011 14:02:52 +0000 (UTC) diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c index 4f6f679..4a5a42b 100644 --- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c @@ -195,7 +195,7 @@ static unsigned int pcc_get_freq(unsigned int cpu) cmd_incomplete: iowrite16(0, &pcch_hdr->status); spin_unlock(&pcc_lock); - return -EINVAL; + return 0; } static int pcc_cpufreq_target(struct cpufreq_policy *policy,