From: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx> Fixed errors in return value checking code, which caused vmbus channel not functioning. Signed-off-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx> Signed-off-by: Hank Janssen <hjanssen@xxxxxxxxxxxxx> Cc: Bill Pemberton <wfp5p@xxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/staging/hv/channel.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/hv/channel.c b/drivers/staging/hv/channel.c index 12c351e..f047c5a 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; } -- 1.7.0.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel