hv:fix MISRA-C violations in create_vm

-- fix "more than one exit point" and "goto detected" violations
-- change prepare_vm0_memmap to void type
-- Add free_vm_id when create vm failed

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Mingqiang Chi
2018-12-19 16:39:31 +08:00
committed by wenlingz
parent bb47184f3c
commit 81a9de6067
3 changed files with 103 additions and 103 deletions

View File

@@ -70,7 +70,7 @@
#define LDTR_AR (0x0082U) /* LDT, type must be 2, refer to SDM Vol3 26.3.1.2 */
#define TR_AR (0x008bU) /* TSS (busy), refer to SDM Vol3 26.3.1.2 */
int32_t prepare_vm0_memmap(struct acrn_vm *vm);
void prepare_vm0_memmap(struct acrn_vm *vm);
/* Definition for a mem map lookup */
struct vm_lu_mem_map {