From d9b6c6c71b24ce2709475682ca7d6e1ee80a915e Mon Sep 17 00:00:00 2001 From: avatar Date: Mon, 14 Sep 2015 15:44:03 +0000 Subject: [PATCH] MFC r286887: Using the error return code documented in the comment. Though there is no direct midi_uninit() caller amongst existing drivers at this moment, a quick experiment indicates that EBUSY gives users more precise error message once drivers start to honour this result. For example, emu_midi_detach() should check the result of mpu401_uninit() and block module unloading if there is any MIDI I/O in progress. git-svn-id: svn://svn.freebsd.org/base/stable/8@287786 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/dev/sound/midi/midi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index eab4bb110..1e147d851 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -403,7 +403,7 @@ midi_uninit(struct snd_midi *m) { int err; - err = ENXIO; + err = EBUSY; mtx_lock(&midistat_lock); mtx_lock(&m->lock); if (m->busy) { -- 2.42.0