Re: [tpmdd-devel] [PATCH v2 3/7] tpm: clean up tpm_tis driver life-cycle

2014-10-07 Thread Jason Gunthorpe
On Tue, Oct 07, 2014 at 08:01:13PM +0300, Jarkko Sakkinen wrote: > + chip = tpm_chip_alloc(dev, &tpm_tis); > + if (!chip) > return -ENODEV; Needs to use ERR_PTR > + rc = tpm_chip_register(chip); > + if (rc) > + return -ENODEV; Wrong ordering, this nee

[PATCH v2 3/7] tpm: clean up tpm_tis driver life-cycle

2014-10-07 Thread Jarkko Sakkinen
Updated tpm_tis to properly use tpm-chip API instead of using ad hoc methods. tpm_chip_unregister() is called on remove event when PNP driver is used and on module removal when platform driver is used. Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis.c | 64 ---