Commit a16e1485 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

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

return -EINVAL instead of calling ASSERT() for these conditionals.
Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3324fb40
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment