diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-08 22:46:35 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-08 22:46:35 -0400 |
commit | e460f7ea7913ce1363f15bc784f7d6817acd8a96 (patch) | |
tree | 471f58dceca8bb29dce5886c44f56de840b044c5 /sys/dev | |
parent | e340a1ac2d38add56d8cdf52bd8f518a081758e5 (diff) |
kernel: xhci: Fix zeroing of NULL page
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/xhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index 89d1b17..b429ac5 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -200,12 +200,12 @@ xhci_init_scratchpads(struct xhci_hc *hc) for (size_t i = 0; i < max_bufs; ++i) { tmp = vm_alloc_frame(1); - memset(PHYS_TO_VIRT(tmp), 0, 0x1000); if (tmp == 0) { /* TODO: Shutdown, free memory */ pr_error("failed to fill scratchpad buffer array\n"); return -1; } + memset(PHYS_TO_VIRT(tmp), 0, 0x1000); bufarr[i] = tmp; } |