]> Pileus Git - ~andy/linux/blobdiff - drivers/staging/hv/NetVsc.c
Staging: hv: test return value of osd_WaitEventCreate()
[~andy/linux] / drivers / staging / hv / NetVsc.c
index 27516d40b6edaf9b8c5c082afb23da5669b68963..d3154e711776a6087027e14e77b0b631846c44b4 100644 (file)
@@ -749,6 +749,10 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
                              &netDevice->ReceivePacketList);
        }
        netDevice->ChannelInitEvent = osd_WaitEventCreate();
+       if (!netDevice->ChannelInitEvent) {
+               ret = -ENOMEM;
+               goto Cleanup;
+       }
 
        /* Open the channel */
        ret = Device->Driver->VmbusChannelInterface.Open(Device,