diff options
author | Pankaj Gupta <pankaj.gupta@amd.com> | 2024-06-07 13:36:11 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-06-11 14:29:14 +0200 |
commit | cd7093a7a168a823d07671348996f049d45e8f67 (patch) | |
tree | 84ce611a47060c13562cfa5bdfbe7f36ea1973cc /target | |
parent | 48779faef3c8e2fe70bd8285bffa731bd76dc844 (diff) | |
download | qemu-cd7093a7a168a823d07671348996f049d45e8f67.zip qemu-cd7093a7a168a823d07671348996f049d45e8f67.tar.gz qemu-cd7093a7a168a823d07671348996f049d45e8f67.tar.bz2 |
i386/sev: Return when sev_common is null
Fixes Coverity CID 1546885.
Fixes: 16dcf200dc ("i386/sev: Introduce "sev-common" type to encapsulate common SEV state")
Signed-off-by: Pankaj Gupta <pankaj.gupta@amd.com>
Message-ID: <20240607183611.1111100-4-pankaj.gupta@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/sev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target/i386/sev.c b/target/i386/sev.c index f18432f..c40562d 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -587,6 +587,7 @@ static SevCapability *sev_get_capabilities(Error **errp) sev_common = SEV_COMMON(MACHINE(qdev_get_machine())->cgs); if (!sev_common) { error_setg(errp, "SEV is not configured"); + return NULL; } sev_device = object_property_get_str(OBJECT(sev_common), "sev-device", |