Skip to content

Commit

Permalink
Staging: hv: vmbus: Cleanup error codes in hv.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Jun 7, 2011
1 parent d6c1c5d commit 39594ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/hv/hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 39594ab

Please sign in to comment.