--- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -931,7 +931,12 @@ return ENXIO; } - /* restore mixer state */ + /* restore mixer state (mixer_get_devt() returns NULL when + * mixer_init() never published a mixer; mixer_reinit would + * deref it at mixer.c:829) */ + if (sc->rch.parent == NULL || sc->pch.parent == NULL) + return ENXIO; + if (mixer_reinit(dev) == -1) { device_printf(dev, "unable to reinitialize the mixer\n"); return ENXIO;