svn commit: r183810 - head/sys/dev/sound/pci/hda
Alexander Motin
mav at FreeBSD.org
Sun Oct 12 21:42:22 UTC 2008
Author: mav
Date: Sun Oct 12 21:42:21 2008
New Revision: 183810
URL: http://svn.freebsd.org/changeset/base/183810
Log:
Fix bug in a second call of the channel allocation function.
This should fix crash on systems where two audio codecs connected
to the same HDA bus.
Modified:
head/sys/dev/sound/pci/hda/hdac.c
Modified: head/sys/dev/sound/pci/hda/hdac.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdac.c Sun Oct 12 20:06:59 2008 (r183809)
+++ head/sys/dev/sound/pci/hda/hdac.c Sun Oct 12 21:42:21 2008 (r183810)
@@ -4945,7 +4945,7 @@ hdac_audio_bind_as(struct hdac_devinfo *
}
} else {
sc->chans = (struct hdac_chan *)realloc(sc->chans,
- sizeof(struct hdac_chan) * cnt,
+ sizeof(struct hdac_chan) * (sc->num_chans + cnt),
M_HDAC, M_ZERO | M_NOWAIT);
if (sc->chans == NULL) {
sc->num_chans = 0;
@@ -4963,7 +4963,6 @@ hdac_audio_bind_as(struct hdac_devinfo *
}
/* Assign associations in order of their numbers, */
- free = 0;
for (j = 0; j < devinfo->function.audio.ascnt; j++) {
if (as[j].enable == 0)
continue;
More information about the svn-src-head
mailing list