xen-blkfront: fix length check

Length is an unsigned integer, so checking against < 0 doesn't make
sense. While there also make clear that a length of 0 always succeeds.

Submitted by:		Pratyush Yadav <pratyush@freebsd.org>
Differential Review:	https://reviews.freebsd.org/D16045
This commit is contained in:
Roger Pau Monné 2018-07-30 11:15:20 +00:00
parent 011dc75d9c
commit 8b19549b0e

View File

@ -602,8 +602,8 @@ xbd_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset,
int sbp;
int rc = 0;
if (length <= 0)
return (rc);
if (length == 0)
return (0);
xbd_quiesce(sc); /* All quiet on the western front. */