Skip to content
Commit de69113e authored by Axel Lin's avatar Axel Lin Committed by James Morris
Browse files

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarRajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 5ce5ed35
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment