Skip to content

Commit

Permalink
Staging: hv: remove ASSERT()s in ChannelMgt.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 1e19c05 commit 75910f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/staging/hv/ChannelMgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 75910f2

Please sign in to comment.