Staging: hv: vmbus: Cleanup error codes in hv.c
authorK. Y. Srinivasan <kys@microsoft.com>
Mon, 6 Jun 2011 22:50:09 +0000 (15:50 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 7 Jun 2011 20:46:06 +0000 (13:46 -0700)
Cleanup error codes in hv.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/hv.c

index a2cc0911de58e22b82a1c058497c901a1a19d8a3..824f81679ae8be5d0161c6e8af71cda23247573f 100644 (file)
@@ -277,11 +277,11 @@ u16 hv_post_message(union hv_connection_id connection_id,
        unsigned long addr;
 
        if (payload_size > HV_MESSAGE_PAYLOAD_BYTE_COUNT)
-               return -1;
+               return -EMSGSIZE;
 
        addr = (unsigned long)kmalloc(sizeof(struct aligned_input), GFP_ATOMIC);
        if (!addr)
-               return -1;
+               return -ENOMEM;
 
        aligned_msg = (struct hv_input_post_message *)
                        (ALIGN(addr, HV_HYPERCALL_PARAM_ALIGN));