2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 18:53:52 +08:00

Staging: hv: vmbus: Cleanup the error return value in vmbus_recvpacket_raw()

Use standard Linux errno values.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
K. Y. Srinivasan 2011-08-25 09:48:59 -07:00 committed by Greg Kroah-Hartman
parent d2598f017f
commit 3d5cad97c4
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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) {