summaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-04-25 17:03:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-03 19:24:26 -0400
commit24b8a406bf5c3675bd193069cc6ab84a66fcbfd7 (patch)
treee6c7c52f02f8eed4b5bb4bedb975503a11e492b5 /drivers/hv
parent3a28fa35d6658703cd26f9c16aaea0eae06afd40 (diff)
hv: Remove unnecessary comparison of unsigned against 0
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>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/channel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 740edec161b..284cf66489f 100644
--- 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;
/*