]> asedeno.scripts.mit.edu Git - linux.git/commit
tpm: vtpm_proxy: conditionally call tpm_chip_unregister
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Sat, 19 Nov 2016 18:32:55 +0000 (11:32 -0700)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sun, 27 Nov 2016 23:31:33 +0000 (01:31 +0200)
commitc4484f791c9434445db7fc1d6791af4388756479
tree72f50b826ac2740d0395b2e0a29926ddc5dc5316
parent0cf577a03f21a988f6dbe8133d07410967b8489a
tpm: vtpm_proxy: conditionally call tpm_chip_unregister

If tpm_chip_register fails vtpm must not call tpm_chip_unregister:

> [   58.271017]  [<ffffffff8155bd32>] dpm_sysfs_remove+0x22/0x60
> [   58.271017]  [<ffffffff8154e438>] device_del+0x58/0x280
> [   58.271017]  [<ffffffffa024c020>] tpm_chip_unregister+0x40/0xb0 [tpm]
> [   58.271017]  [<ffffffffa0292360>] vtpm_proxy_fops_release+0x40/0x60 [tpm_vtpm_proxy]

[jarkko.sakkinen@linux.intel.com: cleaned up unneeded goto away]

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm_vtpm_proxy.c