Browse Source

cpufreq: Drop unnecessary check from cpufreq_policy_alloc()

Since cpufreq_policy_alloc() doesn't use its dev variable for
anything useful, drop that variable from there along with the
NULL check against it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Rafael J. Wysocki 9 years ago
parent
commit
3689ad7ed6
1 changed files with 0 additions and 4 deletions
  1. 0 4
      drivers/cpufreq/cpufreq.c

+ 0 - 4
drivers/cpufreq/cpufreq.c

@@ -1073,13 +1073,9 @@ static void handle_update(struct work_struct *work)
 
 
 static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
 static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
 {
 {
-	struct device *dev = get_cpu_device(cpu);
 	struct cpufreq_policy *policy;
 	struct cpufreq_policy *policy;
 	int ret;
 	int ret;
 
 
-	if (WARN_ON(!dev))
-		return NULL;
-
 	policy = kzalloc(sizeof(*policy), GFP_KERNEL);
 	policy = kzalloc(sizeof(*policy), GFP_KERNEL);
 	if (!policy)
 	if (!policy)
 		return NULL;
 		return NULL;