Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e052d98 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman
Browse files

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: 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 75910f23
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);