Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197291
b: refs/heads/master
c: 80d11b2
h: refs/heads/master
i:
  197289: 7d2eb02
  197287: fb942ac
v: v3
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed May 11, 2010
1 parent d7c5c1a commit 6076794
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8cad0af9a1a1882cd00f12f8f7c79690f563b1d7
refs/heads/master: 80d11b2ae26543656f7226b44ed9d6a184766e85
5 changes: 5 additions & 0 deletions trunk/drivers/staging/hv/Connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ int VmbusConnect(void)
}

msgInfo->WaitEvent = osd_WaitEventCreate();
if (!msgInfo->WaitEvent) {
ret = -ENOMEM;
goto Cleanup;
}

msg = (struct vmbus_channel_initiate_contact *)msgInfo->Msg;

msg->Header.MessageType = ChannelMessageInitiateContact;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/staging/hv/NetVsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/staging/hv/StorVsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ static int StorVscChannelInit(struct hv_device *Device)
*/
memset(request, 0, sizeof(struct storvsc_request_extension));
request->WaitEvent = osd_WaitEventCreate();
if (!request->WaitEvent) {
ret = -ENOMEM;
goto nomem;
}

vstorPacket->Operation = VStorOperationBeginInitialization;
vstorPacket->Flags = REQUEST_COMPLETION_FLAG;
Expand Down Expand Up @@ -338,7 +342,7 @@ static int StorVscChannelInit(struct hv_device *Device)
Cleanup:
kfree(request->WaitEvent);
request->WaitEvent = NULL;

nomem:
PutStorDevice(Device);

DPRINT_EXIT(STORVSC);
Expand Down Expand Up @@ -649,6 +653,10 @@ int StorVscOnHostReset(struct hv_device *Device)
vstorPacket = &request->VStorPacket;

request->WaitEvent = osd_WaitEventCreate();
if (!request->WaitEvent) {
ret = -ENOMEM;
goto Cleanup;
}

vstorPacket->Operation = VStorOperationResetBus;
vstorPacket->Flags = REQUEST_COMPLETION_FLAG;
Expand Down

0 comments on commit 6076794

Please sign in to comment.