提交 7e052d98 编写于 作者: B Bill Pemberton 提交者: Greg Kroah-Hartman

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: NBill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 75910f23
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册