diff options
author | Bill Pemberton <wfp5p@virginia.edu> | 2010-05-05 15:27:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 14:36:12 -0400 |
commit | 7e052d98f2bbcaaaa6d509081d78e600927cfe60 (patch) | |
tree | e6e654fae01505b9bea73b52ea6d5f6df718d3e0 /drivers/staging/hv/Channel.c | |
parent | 75910f236a30bded00f078cab994f35a7171c39b (diff) |
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>
Diffstat (limited to 'drivers/staging/hv/Channel.c')
-rw-r--r-- | 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 de2ccb1082c..d939723db33 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, | |||
192 | /* Allocate the ring buffer */ | 192 | /* Allocate the ring buffer */ |
193 | out = osd_PageAlloc((SendRingBufferSize + RecvRingBufferSize) | 193 | out = osd_PageAlloc((SendRingBufferSize + RecvRingBufferSize) |
194 | >> PAGE_SHIFT); | 194 | >> PAGE_SHIFT); |
195 | ASSERT(out); | 195 | if (!out) |
196 | return -ENOMEM; | ||
197 | |||
196 | ASSERT(((unsigned long)out & (PAGE_SIZE-1)) == 0); | 198 | ASSERT(((unsigned long)out & (PAGE_SIZE-1)) == 0); |
197 | 199 | ||
198 | in = (void *)((unsigned long)out + SendRingBufferSize); | 200 | in = (void *)((unsigned long)out + SendRingBufferSize); |