Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24b8a406 authored by Tobias Klauser's avatar Tobias Klauser Committed by Greg Kroah-Hartman
Browse files

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: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3a28fa35
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -682,8 +682,7 @@ int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel,
	u32 pfncount = NUM_PAGES_SPANNED(multi_pagebuffer->offset,
	u32 pfncount = NUM_PAGES_SPANNED(multi_pagebuffer->offset,
					 multi_pagebuffer->len);
					 multi_pagebuffer->len);



	if (pfncount > MAX_MULTIPAGE_BUFFER_COUNT)
	if ((pfncount < 0) || (pfncount > MAX_MULTIPAGE_BUFFER_COUNT))
		return -EINVAL;
		return -EINVAL;


	/*
	/*