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>
This commit is contained in:
parent
48779faef3
commit
cd7093a7a1
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user