]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/x86/intel/tpmi: use cleanup helpers in mem_write()
authorZhaoJinming <zhaojinming@uniontech.com>
Thu, 21 May 2026 13:08:47 +0000 (21:08 +0800)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 9 Jun 2026 07:34:54 +0000 (10:34 +0300)
commita221557958e3a82d8565729d445a7385963f30b6
treec3b58e6dd02f510b3d7787de46da16e2dfe0cbb6
parent0b6573e23acc7bca808e539e3edea49683f106de
platform/x86/intel/tpmi: use cleanup helpers in mem_write()

In mem_write(), the temporary array returned by
parse_int_array_user() must be released on all exit paths.
Convert the array variable to use cleanup.h scope-based
cleanup so it is freed automatically on return.

This also moves the array declaration next to
parse_int_array_user() as required by cleanup.h usage
guidelines.

Fixes: 8e0a2fc68ec3 ("platform/x86/intel/tpmi: Use 32 bit aligned address for debugfs mem write")
Cc: stable@vger.kernel.org
Signed-off-by: ZhaoJinming <zhaojinming@uniontech.com>
Link: https://patch.msgid.link/20260521130848.2860219-1-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