Merge umidi_init() with umidi_attach(). Also call umidi_detach() at the
detach label in umidi_attach(), similar to how uaudio_attach() does it.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential D55902
snd_uaudio: Refactor umidi_attach() Authored by christos on Tue, Mar 17, 6:36 PM.
Details
Merge umidi_init() with umidi_attach(). Also call umidi_detach() at the Sponsored by: The FreeBSD Foundation
Diff Detail
Event TimelineComment Actions From what I can see, now, we initialize the mutex only if sc_midi_chan.valid is true, but we will destroy it unconditionally, so we might destroy an uninitialized mutex. Comment Actions Address Mark's comment: if umidi_attach() fails, set sc->sc_midi_chan.valid to
| ||||||||||||||||||||||||||||||||