projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a28fa3
)
hv: Remove unnecessary comparison of unsigned against 0
author
Tobias Klauser
<tklauser@distanz.ch>
Fri, 25 Apr 2014 15:03:50 +0000
(17:03 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 3 May 2014 23:24:26 +0000
(19:24 -0400)
pfncount is of type u32 and thus can never be smaller than 0.
Found by the coverity scanner, CID 143213.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hv/channel.c
b/drivers/hv/channel.c
index 740edec161bbfde4d2431d3958a1b89c4109c1a7..284cf66489f428f1b00434d088da85222f00ea3a 100644
(file)
--- a/
drivers/hv/channel.c
+++ b/
drivers/hv/channel.c
@@
-682,8
+682,7
@@
int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel,
u32 pfncount = NUM_PAGES_SPANNED(multi_pagebuffer->offset,
multi_pagebuffer->len);
-
- if ((pfncount < 0) || (pfncount > MAX_MULTIPAGE_BUFFER_COUNT))
+ if (pfncount > MAX_MULTIPAGE_BUFFER_COUNT)
return -EINVAL;
/*