commit | 8e0ee3c9faed7ca68807ea45141775856c438ac0 | [log] [tgz] |
---|---|---|
author | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | Mon Feb 08 22:31:08 2016 +0200 |
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | Wed Feb 10 04:12:08 2016 +0200 |
tree | b458057391012211f0a69e22270579f2639d4d7d | |
parent | 72c91ce8523ae5828fe5e4417ae0aaab53707a08 [diff] |
tpm: fix the cleanup of struct tpm_chip If the initialization fails before tpm_chip_register(), put_device() will be not called, which causes release callback not to be called. This patch fixes the issue by adding put_device() to devres list of the parent device. Fixes: 313d21eeab ("tpm: device class for tpm") Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> cc: stable@vger.kernel.org Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>