Index: sys/dev/usb/uaudio.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/uaudio.c,v retrieving revision 1.184 diff -p -u -r1.184 uaudio.c --- sys/dev/usb/uaudio.c 12 Apr 2025 08:12:39 -0000 1.184 +++ sys/dev/usb/uaudio.c 7 Jan 2026 14:43:40 -0000 @@ -3688,6 +3688,7 @@ uaudio_chan_open(struct uaudio_softc *sc { struct as_info *as; usb_device_descriptor_t *ddesc; + struct usbd_pipe *pipe; int endpt, clkid; usbd_status err; @@ -3715,19 +3716,25 @@ uaudio_chan_open(struct uaudio_softc *sc } DPRINTF("create pipe to 0x%02x\n", endpt); - err = usbd_open_pipe(as->ifaceh, endpt, USBD_MPSAFE, &ch->pipe); + err = usbd_open_pipe(as->ifaceh, endpt, USBD_MPSAFE, &pipe); if (err) return err; + pipe = atomic_swap_ptr(&ch->pipe, pipe); + KASSERT(pipe == NULL); if (as->edesc1 != NULL) { endpt = as->edesc1->bEndpointAddress; if (endpt != 0) { DPRINTF("create sync-pipe to 0x%02x\n", endpt); err = usbd_open_pipe(as->ifaceh, endpt, USBD_MPSAFE, - &ch->sync_pipe); + &pipe); + if (err) + return err; + pipe = atomic_swap_ptr(&ch->sync_pipe, pipe); + KASSERT(pipe == NULL); } } - return err; + return 0; } Static void