summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2010-05-13 15:56:30 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-14 13:57:56 -0700
commitfd4dc88e46c4d9dd845ffef50a975ceea110fd85 (patch)
tree8f0aed81475895faa4f15838dbddb07285b3b6ae /drivers/staging
parent3dfe08e6073f40a742fe3e5d6b43ca8184c55722 (diff)
downloadlinux-fd4dc88e46c4d9dd845ffef50a975ceea110fd85.tar.gz
linux-fd4dc88e46c4d9dd845ffef50a975ceea110fd85.tar.bz2
linux-fd4dc88e46c4d9dd845ffef50a975ceea110fd85.zip
staging: hv: Fix error checking in channel.c
Fixed errors in return value checking code, which caused vmbus channel not functioning. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/hv/channel.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/hv/channel.c b/drivers/staging/hv/channel.c
index 12c351e16360..f047c5a7f64c 100644
--- a/drivers/staging/hv/channel.c
+++ b/drivers/staging/hv/channel.c
@@ -204,13 +204,13 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
RecvRingBufferSize) >> PAGE_SHIFT;
ret = RingBufferInit(&NewChannel->Outbound, out, SendRingBufferSize);
- if (!ret) {
+ if (ret != 0) {
err = ret;
goto errorout;
}
ret = RingBufferInit(&NewChannel->Inbound, in, RecvRingBufferSize);
- if (!ret) {
+ if (ret != 0) {
err = ret;
goto errorout;
}
@@ -228,7 +228,7 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
RecvRingBufferSize,
&NewChannel->RingBufferGpadlHandle);
- if (!ret) {
+ if (ret != 0) {
err = ret;
goto errorout;
}
@@ -569,7 +569,7 @@ int VmbusChannelEstablishGpadl(struct vmbus_channel *Channel, void *Kbuffer,
ret = VmbusPostMessage(gpadlBody,
subMsgInfo->MessageSize -
sizeof(*subMsgInfo));
- if (!ret)
+ if (ret != 0)
goto Cleanup;
}