提交 fd4dc88e 编写于 作者: H Haiyang Zhang 提交者: Greg Kroah-Hartman

staging: hv: Fix error checking in channel.c

Fixed errors in return value checking code, which caused vmbus channel
not functioning.
Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: NHank Janssen <hjanssen@microsoft.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 3dfe08e6
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册