dect
/
linux-2.6
Archived
13
0
Fork 0

Staging: hv: check return value of osd_PageAlloc()

The return value of osd_PageAlloc() was checked using an ASSERT().
Change that to more useful behaviour.

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>
This commit is contained in:
Bill Pemberton 2010-05-05 15:27:30 -04:00 committed by Greg Kroah-Hartman
parent 75910f236a
commit 7e052d98f2
1 changed files with 3 additions and 1 deletions

View File

@ -192,7 +192,9 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
/* Allocate the ring buffer */
out = osd_PageAlloc((SendRingBufferSize + RecvRingBufferSize)
>> PAGE_SHIFT);
ASSERT(out);
if (!out)
return -ENOMEM;
ASSERT(((unsigned long)out & (PAGE_SIZE-1)) == 0);
in = (void *)((unsigned long)out + SendRingBufferSize);