Browse Source

[ehci] Do not treat zero-length NULL pointers as unreachable

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
6424a38323
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/drivers/usb/ehci.c

+ 2
- 0
src/drivers/usb/ehci.c View File

@@ -603,6 +603,8 @@ static int ehci_enqueue ( struct ehci_device *ehci, struct ehci_ring *ring,
603 603
 
604 604
 	/* Fail if any portion is unreachable */
605 605
 	for ( i = 0 ; i < count ; i++ ) {
606
+		if ( ! xfer[i].len )
607
+			continue;
606 608
 		phys = ( virt_to_phys ( xfer[i].data ) + xfer[i].len - 1 );
607 609
 		if ( ( phys > 0xffffffffUL ) && ( ! ehci->addr64 ) )
608 610
 			return -ENOTSUP;

Loading…
Cancel
Save