diff options
author | avatar <avatar@FreeBSD.org> | 2015-09-01 22:35:53 +0000 |
---|---|---|
committer | avatar <avatar@FreeBSD.org> | 2015-09-01 22:35:53 +0000 |
commit | 49c820db709f5b2a0ac43ec2b24a3223ee1686fd (patch) | |
tree | 2dc7e29cab1f595ba965010669afe5d6eea17f3c | |
parent | 2fa34e5809264269064cfede258aced90aee2795 (diff) | |
download | FreeBSD-src-49c820db709f5b2a0ac43ec2b24a3223ee1686fd.zip FreeBSD-src-49c820db709f5b2a0ac43ec2b24a3223ee1686fd.tar.gz |
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.
-rw-r--r-- | sys/dev/sound/midi/midi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 5537d62..f95218b 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) { |