Commit 002b53ea authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: hv: return -EINVAL instead of calling ASSERT()

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c827f944
...@@ -793,7 +793,8 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel, ...@@ -793,7 +793,8 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
ASSERT(PageCount <= MAX_PAGE_BUFFER_COUNT); if (PageCount > MAX_PAGE_BUFFER_COUNT)
return -EINVAL;
DumpVmbusChannel(Channel); DumpVmbusChannel(Channel);
...@@ -864,8 +865,8 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel, ...@@ -864,8 +865,8 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
DPRINT_DBG(VMBUS, "data buffer - offset %u len %u pfn count %u", DPRINT_DBG(VMBUS, "data buffer - offset %u len %u pfn count %u",
MultiPageBuffer->Offset, MultiPageBuffer->Length, PfnCount); MultiPageBuffer->Offset, MultiPageBuffer->Length, PfnCount);
ASSERT(PfnCount > 0); if ((PfnCount < 0) || (PfnCount > MAX_MULTIPAGE_BUFFER_COUNT))
ASSERT(PfnCount <= MAX_MULTIPAGE_BUFFER_COUNT); return -EINVAL;
/* /*
* Adjust the size down since VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER is * Adjust the size down since VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment