Re: [PATCH v7 15/22] x86/virt/tdx: Restore TDX module state
From: Chao Gao
Date: Tue Apr 07 2026 - 08:07:41 EST
>+int tdx_module_run_update(void)
>+{
>+ struct tdx_module_args args = {};
>+ int ret;
>+
>+ ret = seamcall_prerr(TDH_SYS_UPDATE, &args);
>+ if (ret) {
>+ pr_err("update failed (%d)\n", ret);
>+ tdx_module_status = TDX_MODULE_ERROR;
>+ return ret;
>+ }
The pr_err() isn't needed as seamcall_prerr() will emit a
message. and no need to set tdx_module_status to ERROR on
failure as it is already done during shutdown.
so, this can be simplified to:
ret = seamcall_prerr(TDH_SYS_UPDATE, &args);
if (ret)
return ret;