Commit 44939d37 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: Change Cleanup to cleanup in hv.c

Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarAbhishek Kane <v-abkane@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b413bba3
...@@ -161,7 +161,7 @@ int hv_init(void) ...@@ -161,7 +161,7 @@ int hv_init(void)
sizeof(void *) * MAX_NUM_CPUS); sizeof(void *) * MAX_NUM_CPUS);
if (!query_hypervisor_presence()) if (!query_hypervisor_presence())
goto Cleanup; goto cleanup;
max_leaf = query_hypervisor_info(); max_leaf = query_hypervisor_info();
/* HvQueryHypervisorFeatures(maxLeaf); */ /* HvQueryHypervisorFeatures(maxLeaf); */
...@@ -172,7 +172,7 @@ int hv_init(void) ...@@ -172,7 +172,7 @@ int hv_init(void)
rdmsrl(HV_X64_MSR_GUEST_OS_ID, hv_context.guestid); rdmsrl(HV_X64_MSR_GUEST_OS_ID, hv_context.guestid);
if (hv_context.guestid != 0) if (hv_context.guestid != 0)
goto Cleanup; goto cleanup;
/* Write our OS info */ /* Write our OS info */
wrmsrl(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID); wrmsrl(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID);
...@@ -188,7 +188,7 @@ int hv_init(void) ...@@ -188,7 +188,7 @@ int hv_init(void)
virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC); virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC);
if (!virtaddr) if (!virtaddr)
goto Cleanup; goto cleanup;
hypercall_msr.enable = 1; hypercall_msr.enable = 1;
...@@ -200,7 +200,7 @@ int hv_init(void) ...@@ -200,7 +200,7 @@ int hv_init(void)
rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64); rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
if (!hypercall_msr.enable) if (!hypercall_msr.enable)
goto Cleanup; goto cleanup;
hv_context.hypercall_page = virtaddr; hv_context.hypercall_page = virtaddr;
...@@ -209,7 +209,7 @@ int hv_init(void) ...@@ -209,7 +209,7 @@ int hv_init(void)
kmalloc(sizeof(struct hv_input_signal_event_buffer), kmalloc(sizeof(struct hv_input_signal_event_buffer),
GFP_KERNEL); GFP_KERNEL);
if (!hv_context.signal_event_buffer) if (!hv_context.signal_event_buffer)
goto Cleanup; goto cleanup;
hv_context.signal_event_param = hv_context.signal_event_param =
(struct hv_input_signal_event *) (struct hv_input_signal_event *)
...@@ -224,7 +224,7 @@ int hv_init(void) ...@@ -224,7 +224,7 @@ int hv_init(void)
return ret; return ret;
Cleanup: cleanup:
if (virtaddr) { if (virtaddr) {
if (hypercall_msr.enable) { if (hypercall_msr.enable) {
hypercall_msr.as_uint64 = 0; hypercall_msr.as_uint64 = 0;
...@@ -345,7 +345,7 @@ void hv_synic_init(void *irqarg) ...@@ -345,7 +345,7 @@ void hv_synic_init(void *irqarg)
if (hv_context.synic_message_page[cpu] == NULL) { if (hv_context.synic_message_page[cpu] == NULL) {
pr_err("Unable to allocate SYNIC message page\n"); pr_err("Unable to allocate SYNIC message page\n");
goto Cleanup; goto cleanup;
} }
hv_context.synic_event_page[cpu] = hv_context.synic_event_page[cpu] =
...@@ -353,7 +353,7 @@ void hv_synic_init(void *irqarg) ...@@ -353,7 +353,7 @@ void hv_synic_init(void *irqarg)
if (hv_context.synic_event_page[cpu] == NULL) { if (hv_context.synic_event_page[cpu] == NULL) {
pr_err("Unable to allocate SYNIC event page\n"); pr_err("Unable to allocate SYNIC event page\n");
goto Cleanup; goto cleanup;
} }
/* Setup the Synic's message page */ /* Setup the Synic's message page */
...@@ -391,7 +391,7 @@ void hv_synic_init(void *irqarg) ...@@ -391,7 +391,7 @@ void hv_synic_init(void *irqarg)
hv_context.synic_initialized = true; hv_context.synic_initialized = true;
return; return;
Cleanup: cleanup:
if (hv_context.synic_event_page[cpu]) if (hv_context.synic_event_page[cpu])
free_page((unsigned long)hv_context.synic_event_page[cpu]); free_page((unsigned long)hv_context.synic_event_page[cpu]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment