Do not free sc if attach failed, as it was allocated by the bus

infrastructure, not us.  This appears to be a leftover from an older
version of the driver.

Submitted by:	avg
Tested by:	Anton Shterenlikht <mexas bristol.ac.uk>
MFC after:	1 week
X-MFC-Note:	To stable/8 and stable/7 only
This commit is contained in:
Gavin Atkinson 2010-08-04 07:49:40 +00:00
parent 2d6804f60e
commit af9800150c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=210839

View File

@ -4314,7 +4314,6 @@ hdac_attach(device_t dev)
hdac_dma_free(sc, &sc->corb_dma);
hdac_mem_free(sc);
snd_mtxfree(sc->lock);
free(sc, M_DEVBUF);
return (ENXIO);
}