mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 16:11:38 +00:00
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:
parent
3324fb4053
commit
a16e1485c7
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user