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

Commit b25872cc authored by Petar Sivenov's avatar Petar Sivenov Committed by Gerrit - the friendly Code Review server
Browse files

msm: buf_mgr: fixes incorrect warning on cleanup



During stop session, buffer manager checks for still allocated buffers
used by corresponding session and frees them. However the warning
message is outside session check and is shown every time if there are
buffers used from other sessions. Additionally, this is time consuming
operation in a critical section and causes stability issues in camera
operation.

Change-Id: I71b2613b2e260de5e1267b43f55819df7dd3aa10
Signed-off-by: default avatarPetar Sivenov <psiven@codeaurora.org>
parent 5720340d
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -297,11 +297,12 @@ static void msm_buf_mngr_sd_shutdown(struct msm_buf_mngr_device *dev,
	if (!list_empty(&dev->buf_qhead)) {
		list_for_each_entry_safe(bufs,
			save, &dev->buf_qhead, entry) {
			if (session->session == bufs->session_id) {
				pr_info("%s: Delete invalid bufs =%pK, session_id=%u, bufs->ses_id=%d, str_id=%d, idx=%d\n",
				__func__, (void *)bufs, session->session,
					__func__, (void *)bufs,
					session->session,
					bufs->session_id, bufs->stream_id,
					bufs->index);
			if (session->session == bufs->session_id) {
				list_del_init(&bufs->entry);
				kfree(bufs);
			}