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>
/* 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);