mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-20 11:55:03 +00:00
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>
This commit is contained in:
parent
1ded89e78b
commit
5717528577
1 changed files with 2 additions and 2 deletions
|
@ -294,8 +294,8 @@ static int test_readonly(struct udevice *dev)
|
||||||
*/
|
*/
|
||||||
index_0 += 1;
|
index_0 += 1;
|
||||||
if (tpm_nv_write_value(dev, INDEX0, (uint8_t *)&index_0,
|
if (tpm_nv_write_value(dev, INDEX0, (uint8_t *)&index_0,
|
||||||
sizeof(index_0) !=
|
sizeof(index_0)) !=
|
||||||
TPM_SUCCESS)) {
|
TPM_SUCCESS) {
|
||||||
pr_err("\tcould not write index 0\n");
|
pr_err("\tcould not write index 0\n");
|
||||||
}
|
}
|
||||||
tpm_nv_write_value_lock(dev, INDEX0);
|
tpm_nv_write_value_lock(dev, INDEX0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue