diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -288,15 +288,6 @@ priv = NULL; } -#define DSP_FIXUP_ERROR() do { \ - if (!DSP_F_VALID(flags)) \ - error = EINVAL; \ - if (!DSP_F_DUPLEX(flags) && \ - ((DSP_F_READ(flags) && d->reccount == 0) || \ - (DSP_F_WRITE(flags) && d->playcount == 0))) \ - error = ENOTSUP; \ -} while (0) - static int dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) { @@ -332,7 +323,12 @@ PCM_WAIT(d); error = 0; - DSP_FIXUP_ERROR(); + if (!DSP_F_VALID(flags)) + error = EINVAL; + if (!DSP_F_DUPLEX(flags) && + ((DSP_F_READ(flags) && d->reccount == 0) || + (DSP_F_WRITE(flags) && d->playcount == 0))) + error = ENOTSUP; if (error != 0) { PCM_UNLOCK(d); PCM_GIANT_EXIT(d);