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

Commit 42566689 authored by Konstantin Dorfman's avatar Konstantin Dorfman
Browse files

soc: qcom: spcom: fix spcom channel lock



This change adds lock while updating channel table entry. The channel
table modification must be exclusively locked for changes, because it is
accessed by many different contexts.
This change fixes uneven unlock.

Change-Id: I9bb82cb77aafbd732f7c6d3c7b2271b31d082da5
Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>
parent bb84735e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1706,6 +1706,7 @@ static int spcom_create_channel_chardev(const char *name)
		pr_err("can't unregister rpmsg drv\n", ret);
exit_destroy_channel:
	// empty channel leaves free slot for next time
	mutex_lock(&ch->lock);
	memset(ch->name, 0, SPCOM_CHANNEL_NAME_SIZE);
	mutex_unlock(&ch->lock);
	return -EFAULT;