Lines Matching refs:result
15 uint32_t result; \
17 result = (tpm_command); \
18 if (result != TPM_SUCCESS) { \
20 __LINE__, result); \
21 return result; \
35 uint32_t result = tpm_startup(dev, TPM_ST_CLEAR); in TlclStartupIfNeeded() local
37 return result == TPM_INVALID_POSTINIT ? TPM_SUCCESS : result; in TlclStartupIfNeeded()
50 uint32_t result; in tpm_get_flags() local
52 result = tpm_get_permanent_flags(dev, &pflags); in tpm_get_flags()
53 if (result) in tpm_get_flags()
54 return result; in tpm_get_flags()
77 uint32_t result; in tpm_is_owned() local
79 result = tpm_read_pubek(dev, response, sizeof(response)); in tpm_is_owned()
81 return result != TPM_SUCCESS; in tpm_is_owned()
184 uint32_t result; in test_global_lock() local
201 result = tpm_nv_write_value(dev, INDEX0, (uint8_t *)&x, sizeof(x)); in test_global_lock()
202 assert(result == TPM_AREA_LOCKED); in test_global_lock()
214 result = tpm_nv_write_value(dev, INDEX1, (uint8_t *)&x, sizeof(x)); in test_global_lock()
215 assert(result == TPM_BAD_PRESENCE); in test_global_lock()
312 uint32_t result; in test_redefine_unowned() local
338 result = tpm_nv_define_space(dev, INDEX0, perm, sizeof(uint32_t)); in test_redefine_unowned()
339 assert(result == TPM_AREA_LOCKED); in test_redefine_unowned()
349 result = tpm_nv_define_space(dev, INDEX0, perm, sizeof(uint32_t)); in test_redefine_unowned()
350 assert(result == TPM_BAD_PRESENCE); in test_redefine_unowned()
351 result = tpm_nv_define_space(dev, INDEX1, perm, sizeof(uint32_t)); in test_redefine_unowned()
352 assert(result == TPM_BAD_PRESENCE); in test_redefine_unowned()
380 uint32_t result; in test_startup() local
385 result = tpm_startup(dev, TPM_ST_CLEAR); in test_startup()
386 if (result != 0 && result != TPM_INVALID_POSTINIT) in test_startup()
387 printf("\ttpm startup failed with 0x%x\n", result); in test_startup()
388 result = tpm_get_flags(dev, NULL, NULL, NULL); in test_startup()
389 if (result != 0) in test_startup()
390 printf("\ttpm getflags failed with 0x%x\n", result); in test_startup()
393 result = tpm_get_flags(dev, NULL, NULL, NULL); in test_startup()
394 if (result != 0) in test_startup()
395 printf("\ttpm getflags failed with 0x%x\n", result); in test_startup()
448 uint32_t result; in test_write_limit() local
462 result = tpm_nv_write_value(dev, INDEX0, (uint8_t *)&i, in test_write_limit()
464 switch (result) { in test_write_limit()
471 result, result); in test_write_limit()