Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tpm xen: Remove bogus tpm_chip_unregister

tpm_chip_unregister can only be called after tpm_chip_register.
devm manages the allocation so no unwind is needed here.

Cc: stable@vger.kernel.org
Fixes: afb5abc262e96 ("tpm: two-phase chip management functions")
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

authored by

Jason Gunthorpe and committed by
Jarkko Sakkinen
1f0f30e4 d1d253cf

-1
-1
drivers/char/tpm/xen-tpmfront.c
··· 307 307 rv = setup_ring(dev, priv); 308 308 if (rv) { 309 309 chip = dev_get_drvdata(&dev->dev); 310 - tpm_chip_unregister(chip); 311 310 ring_free(priv); 312 311 return rv; 313 312 }