On Mon, Nov 21, 2016 at 10:15:30AM -0700, Jason Gunthorpe wrote: > On Mon, Nov 21, 2016 at 12:06:20AM +0530, Nayna wrote: > > > rc = tpm_bios_log_setup(chip); > > >- if (rc == -ENODEV) > > >+ if (rc != 0 && rc != -ENODEV) > > > return rc; > > > > This will return in case of -EFAULT as well, where the check is that log is > > already initialized. Do we want to fail the probe here as well ? > > > > -EFAULT is returned from tpm_read_log() as below: > > That is fine, we should never read the log twice.
I just went through tpm_bios_log_setup(), tpm_read_log_of() and tpm_read_log_acpi(). The error handling is sound now but the condition should be in tpm_bios_log_setup(). Not in tpm_chip_register(). It is applied but if you don't mind I would like make a small commit that moves the condition to that function. I think tpm_chip_register() should only care when something went wrong. /Jarkko ------------------------------------------------------------------------------ _______________________________________________ tpmdd-devel mailing list tpmdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tpmdd-devel