From: Bill Pemberton <wfp5p@xxxxxxxxxxxx> The return value of osd_PageAlloc() was checked using an ASSERT(). Change that to more useful behaviour. Signed-off-by: Bill Pemberton <wfp5p@xxxxxxxxxxxx> Cc: Hank Janssen <hjanssen@xxxxxxxxxxxxx> Cc: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/staging/hv/Channel.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index de2ccb1..d939723 100644 --- a/drivers/staging/hv/Channel.c +++ b/drivers/staging/hv/Channel.c @@ -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); -- 1.7.0.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel