From 24b8a406bf5c3675bd193069cc6ab84a66fcbfd7 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 25 Apr 2014 17:03:50 +0200 Subject: 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 Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/hv') 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; /* -- cgit v1.2.3