summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp/sp-dev.h
diff options
context:
space:
mode:
authorJohn Allen <john.allen@amd.com>2020-03-03 07:57:23 -0600
committerHerbert Xu <herbert@gondor.apana.org.au>2020-03-12 23:00:12 +1100
commit1f14b57ffc0adcbba0cf35214b0a6129ceae9d09 (patch)
treea675171177195ece13b36c3b30c2f8cded38c348 /drivers/crypto/ccp/sp-dev.h
parent7548bf8c17d84607c106bd45d81834afd95a2edb (diff)
downloadlinux-stable-1f14b57ffc0adcbba0cf35214b0a6129ceae9d09.tar.gz
linux-stable-1f14b57ffc0adcbba0cf35214b0a6129ceae9d09.tar.bz2
linux-stable-1f14b57ffc0adcbba0cf35214b0a6129ceae9d09.zip
crypto: ccp - Cleanup misc_dev on sev_exit()
Explicitly free and clear misc_dev in sev_exit(). Since devm_kzalloc() associates misc_dev with the first device that gets probed, change from devm_kzalloc() to kzalloc() and explicitly free memory in sev_exit() as the first device probed is not guaranteed to be the last device released. To ensure that the variable gets properly set to NULL, remove the local definition of misc_dev. Fixes: 200664d5237f ("crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support") Signed-off-by: John Allen <john.allen@amd.com> Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/sp-dev.h')
0 files changed, 0 insertions, 0 deletions