From 6424a383231d622245514ce9d4f716a6aa607ac0 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 11 Sep 2015 00:19:16 +0100 Subject: [PATCH] [ehci] Do not treat zero-length NULL pointers as unreachable Signed-off-by: Michael Brown --- src/drivers/usb/ehci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/drivers/usb/ehci.c b/src/drivers/usb/ehci.c index 0a89ec13..c2de53a4 100644 --- a/src/drivers/usb/ehci.c +++ b/src/drivers/usb/ehci.c @@ -603,6 +603,8 @@ static int ehci_enqueue ( struct ehci_device *ehci, struct ehci_ring *ring, /* Fail if any portion is unreachable */ for ( i = 0 ; i < count ; i++ ) { + if ( ! xfer[i].len ) + continue; phys = ( virt_to_phys ( xfer[i].data ) + xfer[i].len - 1 ); if ( ( phys > 0xffffffffUL ) && ( ! ehci->addr64 ) ) return -ENOTSUP;