Drivers: hv: vmbus: Fix error code returned by vmbus_post_msg()
authorK. Y. Srinivasan <kys@microsoft.com>
Sun, 30 Apr 2017 23:21:16 +0000 (16:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 May 2017 14:55:28 +0000 (16:55 +0200)
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>
drivers/hv/connection.c

index fce27fb141cc618d99099f569d1d5a63ac7f53f9..a938fcfe9bc9209153e3e3b92de12d7bfc2dbd30 100644 (file)
@@ -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;