mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-10 02:21:14 +00:00
tpm2: Rearrange code in _plat__IsNvAvailable to avoid unused var
Rerrange the code in _plat__IsNvavailable to avoid an unused variable. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
1b2c4fc5b9
commit
bca3109634
@ -291,15 +291,15 @@ _plat__IsNvAvailable(
|
||||
)
|
||||
{
|
||||
int retVal = 0;
|
||||
// NV is not available if the TPM is in failure mode
|
||||
if(!s_NvIsAvailable)
|
||||
retVal = 1;
|
||||
|
||||
#ifdef TPM_LIBTPMS_CALLBACKS
|
||||
if (libtpms_plat__IsNvAvailable() == 1)
|
||||
return 0;
|
||||
#endif /* TPM_LIBTPMS_CALLBACKS */
|
||||
|
||||
// NV is not available if the TPM is in failure mode
|
||||
if(!s_NvIsAvailable)
|
||||
retVal = 1;
|
||||
#if FILE_BACKED_NV
|
||||
else
|
||||
retVal = (s_NvFile == NULL);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user