return 0;
 err:
+       /*
+        * Any memory allocations that succeeded will be freed when
+        * the caller cleans up by calling hv_synic_free()
+        */
        return -ENOMEM;
 }
 
                struct hv_per_cpu_context *hv_cpu
                        = per_cpu_ptr(hv_context.cpu_context, cpu);
 
-               if (hv_cpu->synic_event_page)
-                       free_page((unsigned long)hv_cpu->synic_event_page);
-               if (hv_cpu->synic_message_page)
-                       free_page((unsigned long)hv_cpu->synic_message_page);
-               if (hv_cpu->post_msg_page)
-                       free_page((unsigned long)hv_cpu->post_msg_page);
+               kfree(hv_cpu->clk_evt);
+               free_page((unsigned long)hv_cpu->synic_event_page);
+               free_page((unsigned long)hv_cpu->synic_message_page);
+               free_page((unsigned long)hv_cpu->post_msg_page);
        }
 
        kfree(hv_context.hv_numa_map);