fix a bug

This commit is contained in:
songyanguang 2024-08-05 20:54:24 +08:00
parent 77bed3c28f
commit 3886ed4b12
1 changed files with 2 additions and 2 deletions

View File

@ -1815,7 +1815,7 @@ static int xhci_context ( struct xhci_host *xhci, struct xhci_slot *slot,
rc = -ENOMEM;
goto err_alloc;
}
input = input_vir;
input = (void *)input_vir;
memset ( input, 0, len );
/* Populate input context */
@ -2070,7 +2070,7 @@ int xhci_device_open ( struct xhci_host *xhci, struct xhci_endpoint *ep, int *sl
goto err_alloc_context;
}
#endif
rc = naive_mmap(&context_addr, &context_phy, len, false);
rc = naive_mmap(&context_vir, &context_phy, len, false);
if(rc != 0){
USB_LOG_ERR("XHCI %s could not allocate xhci device context\n", xhci->name );
rc = -ENOMEM;