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

Commit 1ab46e78 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: rmnet_shs: Fix shs_boost_wq memleak"

parents 603cd845 ed5725e9
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ void rmnet_shs_boost_cpus()
	if (work_pending(&boost_cpu))
		return;

	if (shs_boost_wq)
		queue_work(shs_boost_wq, &boost_cpu);
}

@@ -126,11 +127,14 @@ void rmnet_shs_reset_cpus()
	if (work_pending(&boost_cpu))
		return;

	if (shs_boost_wq)
		queue_work(shs_boost_wq, &boost_cpu);
}

int rmnet_shs_freq_init(void)
{

	if (!shs_boost_wq)
		shs_boost_wq = alloc_workqueue("shs_boost_wq", WQ_HIGHPRI, 0);

	if (!shs_boost_wq)
@@ -149,6 +153,11 @@ int rmnet_shs_freq_exit(void)
	rmnet_shs_reset_freq();
	cancel_work_sync(&boost_cpu);

	if (shs_boost_wq) {
		destroy_workqueue(shs_boost_wq);
		shs_boost_wq = NULL;
	}

	if (rmnet_shs_freq_enable)
		cpufreq_unregister_notifier(&freq_boost_nb,
					    CPUFREQ_POLICY_NOTIFIER);