]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Follow the advice of the misplaced comment and don't access the map struct
authorian <ian@FreeBSD.org>
Tue, 20 Oct 2015 03:27:59 +0000 (03:27 +0000)
committerian <ian@FreeBSD.org>
Tue, 20 Oct 2015 03:27:59 +0000 (03:27 +0000)
after freeing it.  Remove the comment whose uselessness has been revealed.

sys/arm/arm/busdma_machdep.c

index d7498c5d111a786d8b45e07bc318ee0dfddcb702..bc3035d3ed639ca120b5a793944d726d18e06cf1 100644 (file)
@@ -786,10 +786,9 @@ bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
                ba = coherent_allocator;
        else
                ba = standard_allocator;
-       uma_zfree(dmamap_zone, map);
 
        free(map->slist, M_DEVBUF);
-       /* Be careful not to access map from here on. */
+       uma_zfree(dmamap_zone, map);
 
        bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize);