]> git.baikalelectronics.ru Git - kernel.git/commit
TPM: tpm_nsc: Fix a double free of pdev in cleanup_nsc
authorAxel Lin <axel.lin@gmail.com>
Wed, 3 Aug 2011 23:58:07 +0000 (07:58 +0800)
committerJames Morris <jmorris@namei.org>
Thu, 22 Sep 2011 23:46:17 +0000 (09:46 +1000)
commitecf2327854338cae78c2747bc822b607e7505a9c
tree9885a62b06d34dd407deb1c6c597a4f8ed73153a
parent5df7e81899dc51e0f51cd09a2b3a1faa9f69d6c6
TPM: tpm_nsc: Fix a double free of pdev in cleanup_nsc

platform_device_unregister() will release all resources
and remove it from the subsystem, then drop reference count by
calling platform_device_put().

We should not call kfree(pdev) after platform_device_unregister(pdev).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
drivers/char/tpm/tpm_nsc.c