Re: [tpmdd-devel] [PATCH] tpm: drop chip->is_open and chip->duration_adjusted

From: Jarkko Sakkinen
Date: Thu Nov 17 2016 - 12:36:47 EST


On Thu, Nov 17, 2016 at 04:10:29PM +0530, Nayna wrote:
> On 11/15/2016 05:14 AM, Jarkko Sakkinen wrote:
> > - if (chip->flags & (TPM_CHIP_FLAG_TPM2 | TPM_CHIP_FLAG_VIRTUAL))
> > - return 0;
> > + if (test_bit(TPM_CHIP_FLAG_TPM2, &chip->flags) ||
> > + test_bit(TPM_CHIP_FLAG_VIRTUAL, &chip->flags))
> > + return;
>
> guess should be "return 0;"

Ouch. Good catch. Thank you.

/Jarkko