because the ownership of S3Context has been transfered.\r
\r
@retval EFI_SUCCESS The translation of S3Context to ACPI S3 Boot Script\r
- opcodes has been successfully executed or queued.\r
+ opcodes has been successfully executed or queued. (This\r
+ includes the case when S3Context was empty on input and\r
+ no ACPI S3 Boot Script opcodes have been necessary to\r
+ produce.)\r
\r
@return Error codes from underlying functions.\r
**/\r
{\r
RETURN_STATUS Status;\r
\r
+ if (S3Context->Used == 0) {\r
+ ReleaseS3Context (S3Context);\r
+ return EFI_SUCCESS;\r
+ }\r
+\r
Status = QemuFwCfgS3CallWhenBootScriptReady (AppendFwCfgBootScript,\r
S3Context, sizeof (SCRATCH_BUFFER));\r
return (EFI_STATUS)Status;\r