Do not free the dmamap if it is still busy.
Submitted by: Mark Tinguely MFC after: 3 days
This commit is contained in:
parent
c67fa34ee5
commit
9d04743537
@ -555,12 +555,12 @@ int
|
||||
bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
|
||||
{
|
||||
|
||||
_busdma_free_dmamap(map);
|
||||
if (STAILQ_FIRST(&map->bpages) != NULL) {
|
||||
CTR3(KTR_BUSDMA, "%s: tag %p error %d",
|
||||
__func__, dmat, EBUSY);
|
||||
return (EBUSY);
|
||||
}
|
||||
_busdma_free_dmamap(map);
|
||||
if (dmat->bounce_zone)
|
||||
dmat->bounce_zone->map_count--;
|
||||
dmat->map_count--;
|
||||
|
Loading…
Reference in New Issue
Block a user