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

Commit 8e5b0738 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: qdsp6v2: Correctly free ASM no wait queue"

parents 269c725b 4194bd94
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 * Author: Brian Swetland <swetland@google.com>
 *
 * This software is licensed under the terms of the GNU General Public
@@ -423,6 +423,7 @@ static void q6asm_session_free(struct audio_client *ac)
{
	struct list_head		*ptr, *next;
	struct asm_no_wait_node		*node;
	unsigned long			flags;

	pr_debug("%s: sessionid[%d]\n", __func__, ac->session);
	rtac_remove_popp_from_adm_devices(ac->session);
@@ -431,12 +432,13 @@ static void q6asm_session_free(struct audio_client *ac)
	ac->perf_mode = LEGACY_PCM_MODE;
	ac->fptr_cache_ops = NULL;

	spin_lock_irqsave(&ac->no_wait_que_spinlock, flags);
	list_for_each_safe(ptr, next, &ac->no_wait_que) {
		node = list_entry(ptr, struct asm_no_wait_node, list);
		list_del(&node->list);
		kfree(node);
	}
	list_del(&ac->no_wait_que);
	spin_unlock_irqrestore(&ac->no_wait_que_spinlock, flags);
	return;
}