projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3324fb4
)
staging: hv: remove ASSERT()s and return -EINVAL in RingBuffer.c
author
Bill Pemberton
<wfp5p@virginia.edu>
Wed, 5 May 2010 19:27:50 +0000
(15:27 -0400)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 11 May 2010 18:36:14 +0000
(11:36 -0700)
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>
drivers/staging/hv/RingBuffer.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/hv/RingBuffer.c
b/drivers/staging/hv/RingBuffer.c
index 69f3ebae15a92686cb0e854bd924020b2438f02e..64f8d0f9e05cf3d0f3e4994b62966afd206cead2 100644
(file)
--- a/
drivers/staging/hv/RingBuffer.c
+++ b/
drivers/staging/hv/RingBuffer.c
@@
-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);