Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup based on cppcheck pass (Core)
[palacios.git] / palacios / src / palacios / vmm_time.c
index f7cbb9e..a88b978 100644 (file)
@@ -388,7 +388,7 @@ handle_time_configuration(struct v3_vm_info * vm, v3_cfg_tree_t *cfg) {
 
 int v3_init_time_vm(struct v3_vm_info * vm) {
     v3_cfg_tree_t * cfg_tree = vm->cfg_data->cfg;
-    int ret;
+    int ret=0;
     
     PrintDebug(vm, VCORE_NONE, "Installing TSC MSR hook.\n");
     ret = v3_hook_msr(vm, TSC_MSR, 
@@ -409,10 +409,19 @@ int v3_init_time_vm(struct v3_vm_info * vm) {
     PrintDebug(vm, VCORE_NONE, "Registering TIME_CPUFREQ hypercall.\n");
     ret = v3_register_hypercall(vm, TIME_CPUFREQ_HCALL, 
                                handle_cpufreq_hcall, NULL);
+
+    if (ret!=0) { 
+       return ret;
+    }
+
     PrintDebug(vm, VCORE_NONE, "Registering TIME_RDHTSC hypercall.\n");
     ret = v3_register_hypercall(vm, TIME_RDHTSC_HCALL, 
                                handle_rdhtsc_hcall, NULL);
 
+    if (ret!=0) { 
+       return ret;
+    }
+
     handle_time_configuration(vm, v3_cfg_subtree(cfg_tree, "time"));
 
     return ret;