]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86/intel/tpmi: convert mutex in mem_write() to guard
authorZhaoJinming <zhaojinming@uniontech.com>
Thu, 21 May 2026 13:08:48 +0000 (21:08 +0800)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 9 Jun 2026 11:54:34 +0000 (14:54 +0300)
commit6736b1801908acfa64ef2b651c5bb78389a8a4c6
tree8054c50e4b63aba7ae6f66605dffddc4c9fe435c
parent3b9f95b5a45786f1ca3feff7a736f30f60af08c7
platform/x86/intel/tpmi: convert mutex in mem_write() to guard

Convert the explicit mutex_lock/mutex_unlock pair in mem_write() into
a cleanup.h guard(mutex)() scope-based lock acquisition. This removes
the remaining goto-based cleanup path and keeps the lock held until
the end of the mem_write() scope.

Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: ZhaoJinming <zhaojinming@uniontech.com>
Link: https://patch.msgid.link/20260521130848.2860219-2-zhaojinming@uniontech.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/vsec_tpmi.c