Author: avatar
Date: Thu Sep 17 00:19:27 2015
New Revision: 287888
URL: https://svnweb.freebsd.org/changeset/base/287888

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/7/sys/dev/sound/midi/midi.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/sound/midi/midi.c
==============================================================================
--- stable/7/sys/dev/sound/midi/midi.c  Thu Sep 17 00:17:32 2015        
(r287887)
+++ stable/7/sys/dev/sound/midi/midi.c  Thu Sep 17 00:19:27 2015        
(r287888)
@@ -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) {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to