tpm xen: Remove bogus tpm_chip_unregister
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Wed, 26 Oct 2016 22:28:45 +0000 (16:28 -0600)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sun, 27 Nov 2016 23:31:30 +0000 (01:31 +0200)
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>
drivers/char/tpm/xen-tpmfront.c

index 62028f483bbaacfc78b77b3b65ed2e39c8d1e0e7..a2ab00831df1cc385364f370b78e89e9c609e053 100644 (file)
@@ -307,7 +307,6 @@ static int tpmfront_probe(struct xenbus_device *dev,
        rv = setup_ring(dev, priv);
        if (rv) {
                chip = dev_get_drvdata(&dev->dev);
-               tpm_chip_unregister(chip);
                ring_free(priv);
                return rv;
        }