Skip to content

Commit

Permalink
Staging: hv: vmbus: Cleanup error handling in hv_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Aug 25, 2011
1 parent ffca7c4 commit 5433e00
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/staging/hv/hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ static u64 do_hypercall(u64 control, void *input, void *output)
*/
int hv_init(void)
{
int ret = 0;
int max_leaf;
union hv_x64_msr_hypercall_contents hypercall_msr;
void *virtaddr = NULL;
Expand Down Expand Up @@ -214,7 +213,7 @@ int hv_init(void)
hv_context.signal_event_param->flag_number = 0;
hv_context.signal_event_param->rsvdz = 0;

return ret;
return 0;

cleanup:
if (virtaddr) {
Expand All @@ -225,8 +224,8 @@ int hv_init(void)

vfree(virtaddr);
}
ret = -1;
return ret;

return -ENOTSUPP;
}

/*
Expand Down

0 comments on commit 5433e00

Please sign in to comment.