2023-09-16 00:15:06

by Edgecombe, Rick P

[permalink] [raw]
Subject: Re: [PATCH v13 19/22] x86/virt/tdx: Improve readibility of module initialization error handling

On Sat, 2023-08-26 at 00:14 +1200, Kai Huang wrote:
> With keeping TDMRs upon successful TDX module initialization, now
> only
> put_online_mems() and freeing the buffers of the TDSYSINFO_STRUCT and
> the CMR array still need to be done even when module initialization
> is
> successful.  On the other hand, all other four "out_*" labels before
> them explicitly check the return value and only clean up when module
> initialization fails.
>
> This isn't ideal.  Make all other four "out_*" labels only reachable
> when module initialization fails to improve the readibility of error
^ Nit: "readability"
> handling.  Rename them from "out_*" to "err_*" to reflect the fact.
>
> Signed-off-by: Kai Huang <[email protected]>

Reviewed-by: Rick Edgecombe <[email protected]>