diff options
author | Dan Carpenter | 2023-07-25 09:50:26 +0300 |
---|---|---|
committer | Tom Rini | 2023-08-08 17:05:43 -0400 |
commit | 57175285774751ca751d3d5e9f045d6af95ea43b (patch) | |
tree | 38e95bebdc8ab92e59b3b75d2ff5e9d5f7eb8aee /cmd/tpm_test.c | |
parent | 1ded89e78bca4c43db8e46841c589366202cb2b0 (diff) |
cmd: Fix a size parameter in test_readonly()
The parentheses are in the wrong place so this passes the number of
bytes to write as "sizeof(index_0) != TPM_SUCCESS" when just
"sizeof(index_0)" was intended. (1 byte vs 4 bytes).
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Diffstat (limited to 'cmd/tpm_test.c')
-rw-r--r-- | cmd/tpm_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c index c4ed8e59012..9bdc9c660fd 100644 --- a/cmd/tpm_test.c +++ b/cmd/tpm_test.c @@ -294,8 +294,8 @@ static int test_readonly(struct udevice *dev) */ index_0 += 1; if (tpm_nv_write_value(dev, INDEX0, (uint8_t *)&index_0, - sizeof(index_0) != - TPM_SUCCESS)) { + sizeof(index_0)) != + TPM_SUCCESS) { pr_err("\tcould not write index 0\n"); } tpm_nv_write_value_lock(dev, INDEX0); |