1
0
Fork 0

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

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
hifive-unleashed-5.1
Bill Pemberton 2010-05-05 15:27:39 -04:00 committed by Greg Kroah-Hartman
parent c827f944f5
commit 002b53ea57
1 changed files with 4 additions and 3 deletions

View File

@ -793,7 +793,8 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
DPRINT_ENTER(VMBUS);
ASSERT(PageCount <= MAX_PAGE_BUFFER_COUNT);
if (PageCount > MAX_PAGE_BUFFER_COUNT)
return -EINVAL;
DumpVmbusChannel(Channel);
@ -864,8 +865,8 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
DPRINT_DBG(VMBUS, "data buffer - offset %u len %u pfn count %u",
MultiPageBuffer->Offset, MultiPageBuffer->Length, PfnCount);
ASSERT(PfnCount > 0);
ASSERT(PfnCount <= MAX_MULTIPAGE_BUFFER_COUNT);
if ((PfnCount < 0) || (PfnCount > MAX_MULTIPAGE_BUFFER_COUNT))
return -EINVAL;
/*
* Adjust the size down since VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER is