From 3d5cad97c4be2bfc5cb4e52a0972c6e3bf8c278d Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Thu, 25 Aug 2011 09:48:59 -0700 Subject: [PATCH] Staging: hv: vmbus: Cleanup the error return value in vmbus_recvpacket_raw() Use standard Linux errno values. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/channel.c | 2 +- drivers/staging/hv/hv_mouse.c | 2 +- drivers/staging/hv/netvsc.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/hv/channel.c b/drivers/staging/hv/channel.c index 9eb8def22668..ac92c1f99261 100644 --- a/drivers/staging/hv/channel.c +++ b/drivers/staging/hv/channel.c @@ -811,7 +811,7 @@ int vmbus_recvpacket_raw(struct vmbus_channel *channel, void *buffer, pr_err("Buffer too small - needed %d bytes but " "got space for only %d bytes\n", packetlen, bufferlen); - return -2; + return -ENOBUFS; } *requestid = desc.trans_id; diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c index 572717317e71..d7e24bce4c0d 100644 --- a/drivers/staging/hv/hv_mouse.c +++ b/drivers/staging/hv/hv_mouse.c @@ -539,7 +539,7 @@ static void mousevsc_on_channel_callback(void *context) } break; } - } else if (ret == -2) { + } else if (ret == -ENOBUFS) { /* Handle large packet */ bufferlen = bytes_recvd; buffer = kzalloc(bytes_recvd, GFP_KERNEL); diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c index d547ff676a0b..b89ac7e40ca8 100644 --- a/drivers/staging/hv/netvsc.c +++ b/drivers/staging/hv/netvsc.c @@ -884,7 +884,7 @@ static void netvsc_channel_cb(void *context) break; } - } else if (ret == -2) { + } else if (ret == -ENOBUFS) { /* Handle large packet */ buffer = kmalloc(bytes_recvd, GFP_ATOMIC); if (buffer == NULL) { -- 2.20.1