From: Tobias Klauser Date: Fri, 25 Apr 2014 15:03:50 +0000 (+0200) Subject: hv: Remove unnecessary comparison of unsigned against 0 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=24b8a406bf5c3675bd193069cc6ab84a66fcbfd7;p=linux-beck.git 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 --- 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; /*