staging: hv: remove ASSERT()s and return -EINVAL in RingBuffer.c

return -EINVAL instead of calling ASSERT() for these conditionals.

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>
This commit is contained in:
Bill Pemberton 2010-05-05 15:27:50 -04:00 committed by Greg Kroah-Hartman
parent 3324fb4053
commit a16e1485c7
1 changed files with 2 additions and 1 deletions

View File

@ -490,7 +490,8 @@ int RingBufferRead(RING_BUFFER_INFO *InRingInfo, void *Buffer,
u64 prevIndices = 0;
unsigned long flags;
ASSERT(BufferLen > 0);
if (BufferLen <= 0)
return -EINVAL;
spin_lock_irqsave(&InRingInfo->ring_lock, flags);