瀏覽代碼

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

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 年之前
父節點
當前提交
6424a38323
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      src/drivers/usb/ehci.c

+ 2
- 0
src/drivers/usb/ehci.c 查看文件

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

Loading…
取消
儲存