virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1]  staging: hv: Fix error checking in channel.c
@ 2010-05-13 15:56 Haiyang Zhang
  0 siblings, 0 replies; 2+ messages in thread
From: Haiyang Zhang @ 2010-05-13 15:56 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org',
	'devel@driverdev.osuosl.org',
	"'virtualization@lists.osdl.org'" <virtualiz>

[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]

From: Haiyang Zhang <haiyangz@microsoft.com>

Subject: staging: hv: Fix error checking in channel.c
Fixed errors in return value checking code, which caused vmbus channel
not functioning.

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>

---
 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.6.3.2


[-- Attachment #2: 0513-Fix-error-checking-in-channel.c.patch --]
[-- Type: application/octet-stream, Size: 1558 bytes --]

From: Haiyang Zhang <haiyangz@microsoft.com>

Subject: staging: hv: Fix error checking in channel.c
Fixed errors in return value checking code, which caused vmbus channel
not functioning.

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>

---
 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.6.3.2


[-- Attachment #3: Type: text/plain, Size: 184 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-13 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1FB5E1D5CA062146B38059374562DF72662AB0C9@TK5EX14MBXC130.redmond.corp.microsoft.com>
2010-05-13 16:33 ` [PATCH 1/1] staging: hv: Fix error checking in channel.c Greg KH
2010-05-13 15:56 Haiyang Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).