Return early from bus_dmamap_load callback if the error indicator is set.

Reviewed by:	andrew, manu
This commit is contained in:
jmcneill 2016-07-11 20:14:50 +00:00
parent 044825ce9b
commit 800eb31d87

View File

@ -364,6 +364,10 @@ a10_dma_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int err)
sc = (struct a10_mmc_softc *)arg;
sc->a10_dma_map_err = err;
if (err)
return;
dma_desc = sc->a10_dma_desc;
/* Note nsegs is guaranteed to be zero if err is non-zero. */
for (i = 0; i < nsegs; i++) {