Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);