aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-04-25 11:03:50 -0400
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 740edec161bb..284cf66489f4 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -682,8 +682,7 @@ int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel,
682 u32 pfncount = NUM_PAGES_SPANNED(multi_pagebuffer->offset, 682 u32 pfncount = NUM_PAGES_SPANNED(multi_pagebuffer->offset,
683 multi_pagebuffer->len); 683 multi_pagebuffer->len);
684 684
685 685 if (pfncount > MAX_MULTIPAGE_BUFFER_COUNT)
686 if ((pfncount < 0) || (pfncount > MAX_MULTIPAGE_BUFFER_COUNT))
687 return -EINVAL; 686 return -EINVAL;
688 687
689 /* 688 /*