]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
tpm xen: Remove bogus tpm_chip_unregister
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Wed, 26 Oct 2016 22:28:45 +0000 (16:28 -0600)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Fri, 3 Feb 2017 20:55:30 +0000 (15:55 -0500)
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>
OraBug: 25497392

(cherry picked from commit 1f0f30e404b3d8f4597a2d9b77fba55452f8fd0e)
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/char/tpm/xen-tpmfront.c

index d34c85aa92d4f7ea91f80708bc0afc17c102e349..4deb91b807423d32a67575779b2c54a055d42132 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;
        }