]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Staging: hv: remove ASSERT()s in ChannelMgt.c
authorBill Pemberton <wfp5p@virginia.edu>
Wed, 5 May 2010 19:27:31 +0000 (15:27 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 May 2010 18:36:12 +0000 (11:36 -0700)
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>
drivers/staging/hv/ChannelMgmt.c

index 445506d45edb39f314b46d3052b957c83c42d87f..05e6699e3c78da78ba2b6af32a8d57d3a257868d 100644 (file)
@@ -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;