Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3689ad7e authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent b0d8a69d
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1073,13 +1073,9 @@ static void handle_update(struct work_struct *work)

static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
{
	struct device *dev = get_cpu_device(cpu);
	struct cpufreq_policy *policy;
	int ret;

	if (WARN_ON(!dev))
		return NULL;

	policy = kzalloc(sizeof(*policy), GFP_KERNEL);
	if (!policy)
		return NULL;