In uaudio_detach(), check that sc->sc_alts is not NULL before using it.  This could happen if uaudio_attach() failed, for instance because the device has no valid audio stream interface. Certain MIDI devices expose such descriptors.
In uaudio_detach(), check that sc->sc_alts is not NULL before
using it.  This could happen if uaudio_attach() failed, for
instance because the device has no valid audio stream interface.
Certain MIDI devices expose such descriptors.

ok jakemsr@

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars