Staging: hv: vmbus: Cleanup error handling in hv_init()
authorK. Y. Srinivasan <kys@microsoft.com>
Thu, 25 Aug 2011 16:48:51 +0000 (09:48 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 25 Aug 2011 22:22:19 +0000 (15:22 -0700)
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>
drivers/staging/hv/hv.c

index d2b921bd76523c8554b27bc3851203e7b2cf60e3..736794ef78729dd0c666652007389485c280cb88 100644 (file)
@@ -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;
@@ -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) {
@@ -225,8 +224,8 @@ cleanup:
 
                vfree(virtaddr);
        }
-       ret = -1;
-       return ret;
+
+       return -ENOTSUPP;
 }
 
 /*