aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-08-30 21:11:31 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-08-31 18:29:10 -0400
commit3689ad7ed6a836c4eec5e7bdd17a11a79591bef9 (patch)
tree2c83bd991f64e44c704b8f33fbc336f9d35928df
parentb0d8a69d08069f4f4b1d9670d57a7e22da6e6c6a (diff)
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>
-rw-r--r--drivers/cpufreq/cpufreq.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 3dd4884c6f9e..13fb589b6d2c 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1073,13 +1073,9 @@ static void handle_update(struct work_struct *work)
1073 1073
1074static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu) 1074static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
1075{ 1075{
1076 struct device *dev = get_cpu_device(cpu);
1077 struct cpufreq_policy *policy; 1076 struct cpufreq_policy *policy;
1078 int ret; 1077 int ret;
1079 1078
1080 if (WARN_ON(!dev))
1081 return NULL;
1082
1083 policy = kzalloc(sizeof(*policy), GFP_KERNEL); 1079 policy = kzalloc(sizeof(*policy), GFP_KERNEL);
1084 if (!policy) 1080 if (!policy)
1085 return NULL; 1081 return NULL;