tpm xen: Remove bogus tpm_chip_unregister
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Wed, 26 Oct 2016 22:28:45 +0000 (16:28 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jan 2017 10:16:16 +0000 (11:16 +0100)
commit 1f0f30e404b3d8f4597a2d9b77fba55452f8fd0e upstream.

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

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/xen-tpmfront.c

index 3111f2778079dd49c0f8514d7852c06688a6c4f5..849f2e29c2436f86a3bbe81bfc025f0d1cea0036 100644 (file)
@@ -305,7 +305,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;
        }