Staging: hv: vmbus: Cleanup error handling in hv_init()

Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
K. Y. Srinivasan 2011-08-25 09:48:51 -07:00 committed by Greg Kroah-Hartman
parent ffca7c40b6
commit 5433e00334
1 changed files with 3 additions and 4 deletions

View File

@ -151,7 +151,6 @@ static u64 do_hypercall(u64 control, void *input, void *output)
*/ */
int hv_init(void) int hv_init(void)
{ {
int ret = 0;
int max_leaf; int max_leaf;
union hv_x64_msr_hypercall_contents hypercall_msr; union hv_x64_msr_hypercall_contents hypercall_msr;
void *virtaddr = NULL; void *virtaddr = NULL;
@ -214,7 +213,7 @@ int hv_init(void)
hv_context.signal_event_param->flag_number = 0; hv_context.signal_event_param->flag_number = 0;
hv_context.signal_event_param->rsvdz = 0; hv_context.signal_event_param->rsvdz = 0;
return ret; return 0;
cleanup: cleanup:
if (virtaddr) { if (virtaddr) {
@ -225,8 +224,8 @@ cleanup:
vfree(virtaddr); vfree(virtaddr);
} }
ret = -1;
return ret; return -ENOTSUPP;
} }
/* /*