Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197295
b: refs/heads/master
c: b94ef34
h: refs/heads/master
i:
  197293: 6e28b93
  197291: 6076794
  197287: fb942ac
  197279: 5c26653
v: v3
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed May 11, 2010
1 parent c69c032 commit 4d28d3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: 99259159c0eb58a539ed399677c8294e3792722b
refs/heads/master: b94ef345b26b4d75e5028617e43fb51d7dd0162b
11 changes: 8 additions & 3 deletions trunk/drivers/staging/hv/Channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
void (*OnChannelCallback)(void *context), void *Context)
{
struct vmbus_channel_open_channel *openMsg;
struct vmbus_channel_msginfo *openInfo;
struct vmbus_channel_msginfo *openInfo = NULL;
void *in, *out;
unsigned long flags;
int ret, err = 0;
Expand Down Expand Up @@ -218,7 +218,11 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
SendRingBufferSize +
RecvRingBufferSize,
&NewChannel->RingBufferGpadlHandle);
/* FIXME: the value of ret is not checked */

if (!ret) {
err = ret;
goto errorout;
}

DPRINT_DBG(VMBUS, "channel %p <relid %d gpadl 0x%x send ring %p "
"size %d recv ring %p size %d, downstreamoffset %d>",
Expand Down Expand Up @@ -250,7 +254,6 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
openMsg->OpenId = NewChannel->OfferMsg.ChildRelId; /* FIXME */
openMsg->ChildRelId = NewChannel->OfferMsg.ChildRelId;
openMsg->RingBufferGpadlHandle = NewChannel->RingBufferGpadlHandle;
ASSERT(openMsg->RingBufferGpadlHandle);
openMsg->DownstreamRingBufferPageOffset = SendRingBufferSize >>
PAGE_SHIFT;
openMsg->ServerContextAreaGpadlHandle = 0; /* TODO */
Expand Down Expand Up @@ -295,6 +298,8 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
return 0;

errorout:
RingBufferCleanup(&NewChannel->Outbound);
RingBufferCleanup(&NewChannel->Inbound);
osd_PageFree(out, (SendRingBufferSize + RecvRingBufferSize)
>> PAGE_SHIFT);
kfree(openInfo);
Expand Down

0 comments on commit 4d28d3f

Please sign in to comment.