diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/sound/pci/hda/hdac.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index e1daccb0b8e9..865656ae1862 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -1312,8 +1312,9 @@ hdac_attach(device_t dev) hdac_attach_fail: hdac_irq_free(sc); - for (i = 0; i < sc->num_ss; i++) - hdac_dma_free(sc, &sc->streams[i].bdl); + if (sc->streams != NULL) + for (i = 0; i < sc->num_ss; i++) + hdac_dma_free(sc, &sc->streams[i].bdl); free(sc->streams, M_HDAC); hdac_dma_free(sc, &sc->rirb_dma); hdac_dma_free(sc, &sc->corb_dma); |