diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-02-05 01:38:41 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-02-19 08:55:43 -0500 |
commit | c7cd4afb923bd54f18bee71993127aca550f2737 (patch) | |
tree | ed8bff57efdee147344cf51a879e11fe9edda697 | |
parent | b78a9e2212d4d15fd16af41ae33d05a5c33954de (diff) |
tpm: simplify: tpm_set_global_lock()
When in pack_byte_string() memcpy() is called for size 0 the source buffer
address has no relevance. So we can use NULL here.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | lib/tpm-v1.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/tpm-v1.c b/lib/tpm-v1.c index 3e89f84544..b4498e6afc 100644 --- a/lib/tpm-v1.c +++ b/lib/tpm-v1.c @@ -211,9 +211,7 @@ u32 tpm_nv_write_value(struct udevice *dev, u32 index, const void *data, uint32_t tpm_set_global_lock(struct udevice *dev) { - u32 x; - - return tpm_nv_write_value(dev, TPM_NV_INDEX_0, (uint8_t *)&x, 0); + return tpm_nv_write_value(dev, TPM_NV_INDEX_0, NULL, 0); } u32 tpm_extend(struct udevice *dev, u32 index, const void *in_digest, |