diff options
author | Dave Jiang <dave.jiang@intel.com> | 2023-05-25 17:33:01 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2023-05-26 13:34:39 -0700 |
commit | 793a539ac78843ef9378bb42a44edfbc552a67d5 (patch) | |
tree | 6e28635e692cca814928f26f60db23d1b280fc90 /arch/x86/kvm/vmx/sgx.c | |
parent | a70fc4ed20a6118837b0aecbbf789074935f473b (diff) | |
download | lwn-793a539ac78843ef9378bb42a44edfbc552a67d5.tar.gz lwn-793a539ac78843ef9378bb42a44edfbc552a67d5.zip |
cxl: Explicitly initialize resources when media is not ready
When media is not ready do not assume that the capacity information from
the identify command is valid, i.e. ->total_bytes
->partition_align_bytes ->{volatile,persistent}_only_bytes. Explicitly
zero out the capacity resources and exit early.
Given zero-init of those fields this patch is functionally equivalent to
the prior state, but it improves readability and robustness going
forward.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/168506118166.3004974.13523455340007852589.stgit@djiang5-mobl3
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'arch/x86/kvm/vmx/sgx.c')
0 files changed, 0 insertions, 0 deletions