staging: hv: check return value of RingBufferInit()
authorBill Pemberton <wfp5p@virginia.edu>
Wed, 5 May 2010 19:27:49 +0000 (15:27 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 May 2010 18:36:14 +0000 (11:36 -0700)
commit3324fb405340cf52fe361697a86d235587402d9c
tree5b8ab85cdfb894a8e4ce4352f82260cf7b77f87b
parent1bbdd7a5380239533c4bb648c5d5d9510f12974b
staging: hv: check return value of RingBufferInit()

RingBufferInit() would always return sucess and instead relied on an
ASSERT() to test for an error condition.  Remove the ASSERT() and
return -EINVAL instead.  The return value of RingBufferInit() was also
never checked, so check it.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/Channel.c
drivers/staging/hv/RingBuffer.c