From: Pankaj Gupta <pankaj.gu...@amd.com> Fixes Coverity CID 1546885.
Fixes: 16dcf200dc ("i386/sev: Introduce "sev-common" type to encapsulate common SEV state") Signed-off-by: Pankaj Gupta <pankaj.gu...@amd.com> Message-ID: <20240607183611.1111100-4-pankaj.gu...@amd.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- target/i386/sev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/sev.c b/target/i386/sev.c index f18432f58e2..c40562dce31 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", -- 2.45.1