svn commit: r287786 - stable/8/sys/dev/sound/midi
Tai-hwa Liang
avatar at FreeBSD.org
Mon Sep 14 15:44:05 UTC 2015
Author: avatar
Date: Mon Sep 14 15:44:03 2015
New Revision: 287786
URL: https://svnweb.freebsd.org/changeset/base/287786
Log:
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.
Modified:
stable/8/sys/dev/sound/midi/midi.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/dev/ (props changed)
stable/8/sys/dev/sound/ (props changed)
stable/8/sys/dev/sound/midi/ (props changed)
Modified: stable/8/sys/dev/sound/midi/midi.c
==============================================================================
--- stable/8/sys/dev/sound/midi/midi.c Mon Sep 14 15:37:19 2015 (r287785)
+++ stable/8/sys/dev/sound/midi/midi.c Mon Sep 14 15:44:03 2015 (r287786)
@@ -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) {
More information about the svn-src-stable
mailing list