Date:        Tue, 21 Feb 2017 20:23:37 +0000
    From:        "Nathanial Sloss" <n...@netbsd.org>
    Message-ID:  <20170221202337.a4c46f...@cvs.netbsd.org>

  | Modified Files:
  |     src/sys/dev: audio.c

In addition to Christos' comments, I see this pattern (in the diff)
repeated a few times...

+                       error = audio_waitio(sc, &sc->sc_wchan, vc);
                        if (sc->sc_dying)
                                error = EIO;
                        if (error)

Note that I have no idea of the answer to this question, but which error
code is more important there?

Often the "if (sc->sc_dying)" test would be "if (error == 0 && sc->sc_dying)"
so the first error detected is the one returned, but perhaps the EIO for
the dying case is considered more important?   If so, at least a comment
would help.

kre

Reply via email to