diff options
-rw-r--r-- | sys/dev/sound/pcm/mixer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 2e3c3d5..3e31a61 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -322,11 +322,13 @@ mixer_set_recroute(struct snd_mixer *m, int route) void mix_setdevs(struct snd_mixer *m, u_int32_t v) { - struct snddev_info *d = device_get_softc(m->dev); + struct snddev_info *d; int i; if (m == NULL) return; + + d = device_get_softc(m->dev); if (d != NULL && (d->flags & SD_F_SOFTPCMVOL)) v |= SOUND_MASK_PCM; for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) { |