Skip to content

Commit

Permalink
Drivers: hv: vmbus: Fix error code returned by vmbus_post_msg()
Browse files Browse the repository at this point in the history
ENOBUFS is a more approrpiate error code to be returned
when the hypervisor cannot post the message because of
insufficient buffers. Make the adjustment.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed May 18, 2017
1 parent a1a7ea6 commit 48f4ccd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hv/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep)
break;
case HV_STATUS_INSUFFICIENT_MEMORY:
case HV_STATUS_INSUFFICIENT_BUFFERS:
ret = -ENOMEM;
ret = -ENOBUFS;
break;
case HV_STATUS_SUCCESS:
return ret;
Expand Down

0 comments on commit 48f4ccd

Please sign in to comment.