summaryrefslogtreecommitdiffstats
path: root/drivers/virt/coco
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-12-14 00:17:55 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2022-12-14 00:17:55 +0100
commit740afa4d39414516c36836ad88bed8294c72ba5f (patch)
tree9397b390d9561927935d4580e5031a8e196466d2 /drivers/virt/coco
parentMerge tag 'x86_paravirt_for_v6.2' of git://git.kernel.org/pub/scm/linux/kerne... (diff)
parentvirt/sev-guest: Add a MODULE_ALIAS (diff)
downloadlinux-740afa4d39414516c36836ad88bed8294c72ba5f.tar.xz
linux-740afa4d39414516c36836ad88bed8294c72ba5f.zip
Merge tag 'x86_sev_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 sev updates from Borislav Petkov: - Two minor fixes to the sev-guest driver * tag 'x86_sev_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: virt/sev-guest: Add a MODULE_ALIAS virt/sev-guest: Remove unnecessary free in init_crypto()
Diffstat (limited to 'drivers/virt/coco')
-rw-r--r--drivers/virt/coco/sev-guest/sev-guest.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/virt/coco/sev-guest/sev-guest.c b/drivers/virt/coco/sev-guest/sev-guest.c
index 1ea6d2e5b218..4ec4174e05a3 100644
--- a/drivers/virt/coco/sev-guest/sev-guest.c
+++ b/drivers/virt/coco/sev-guest/sev-guest.c
@@ -171,12 +171,10 @@ static struct snp_guest_crypto *init_crypto(struct snp_guest_dev *snp_dev, u8 *k
crypto->a_len = crypto_aead_authsize(crypto->tfm);
crypto->authtag = kmalloc(crypto->a_len, GFP_KERNEL_ACCOUNT);
if (!crypto->authtag)
- goto e_free_auth;
+ goto e_free_iv;
return crypto;
-e_free_auth:
- kfree(crypto->authtag);
e_free_iv:
kfree(crypto->iv);
e_free_crypto:
@@ -800,3 +798,4 @@ MODULE_AUTHOR("Brijesh Singh <brijesh.singh@amd.com>");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0.0");
MODULE_DESCRIPTION("AMD SEV Guest Driver");
+MODULE_ALIAS("platform:sev-guest");