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-04 01:24:26 +0200
commit24b8a406bf5c3675bd193069cc6ab84a66fcbfd7 (patch)
treee6c7c52f02f8eed4b5bb4bedb975503a11e492b5 /drivers/hv
parentDrivers: hv: vmbus: Implement per-CPU mapping of relid to channel (diff)
downloadlinux-24b8a406bf5c3675bd193069cc6ab84a66fcbfd7.tar.xz
linux-24b8a406bf5c3675bd193069cc6ab84a66fcbfd7.zip
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,
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;
/*