Browse Source

bugfix: Suspicious add with sizeof

fslongjin 2 năm trước cách đây
mục cha
commit
c700737d8e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      kernel/driver/usb/xhci/xhci.c

+ 1 - 1
kernel/driver/usb/xhci/xhci.c

@@ -491,7 +491,7 @@ static uint64_t xhci_create_ring(int trbs)
     memset((void *)vaddr, 0, total_size);
 
     // 设置最后一个trb为link trb
-    xhci_TRB_set_link_cmd(vaddr + total_size - sizeof(sizeof(struct xhci_TRB_t)));
+    xhci_TRB_set_link_cmd(vaddr + total_size - sizeof(struct xhci_TRB_t));
 
     return vaddr;
 }