diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-04-25 15:03:50 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-03 23:24:26 (GMT) |
commit | 24b8a406bf5c3675bd193069cc6ab84a66fcbfd7 (patch) | |
tree | e6c7c52f02f8eed4b5bb4bedb975503a11e492b5 /drivers | |
parent | 3a28fa35d6658703cd26f9c16aaea0eae06afd40 (diff) | |
download | linux-24b8a406bf5c3675bd193069cc6ab84a66fcbfd7.tar.xz |
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')
-rw-r--r-- | drivers/hv/channel.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 740edec..284cf66 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; /* |