diff options
author | Bill Pemberton <wfp5p@virginia.edu> | 2010-05-05 15:27:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 11:36:12 -0700 |
commit | 75910f236a30bded00f078cab994f35a7171c39b (patch) | |
tree | 7677858612d1824ec8afc2a3d43876611c41b612 /drivers/staging/hv/ChannelMgmt.c | |
parent | 1e19c054434c7d3ad618129c2ff5c3d81efa6949 (diff) | |
download | op-kernel-dev-75910f236a30bded00f078cab994f35a7171c39b.zip op-kernel-dev-75910f236a30bded00f078cab994f35a7171c39b.tar.gz |
Staging: hv: remove ASSERT()s in ChannelMgt.c
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/ChannelMgmt.c')
-rw-r--r-- | drivers/staging/hv/ChannelMgmt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c index 445506d..05e6699e 100644 --- a/drivers/staging/hv/ChannelMgmt.c +++ b/drivers/staging/hv/ChannelMgmt.c @@ -753,9 +753,15 @@ int VmbusChannelRequestOffers(void) msgInfo = kmalloc(sizeof(*msgInfo) + sizeof(struct vmbus_channel_message_header), GFP_KERNEL); - ASSERT(msgInfo != NULL); + if (!msgInfo) + return -ENOMEM; msgInfo->WaitEvent = osd_WaitEventCreate(); + if (!msgInfo->WaitEvent) { + kfree(msgInfo); + return -ENOMEM; + } + msg = (struct vmbus_channel_message_header *)msgInfo->Msg; msg->MessageType = ChannelMessageRequestOffers; |