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>
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;
}
RecvRingBufferSize,
&NewChannel->RingBufferGpadlHandle);
- if (!ret) {
+ if (ret != 0) {
err = ret;
goto errorout;
}
ret = VmbusPostMessage(gpadlBody,
subMsgInfo->MessageSize -
sizeof(*subMsgInfo));
- if (!ret)
+ if (ret != 0)
goto Cleanup;
}