From d1d50b701052eb6b62b76813c71f7d5ba520c43d Mon Sep 17 00:00:00 2001 From: Jared McNeill Date: Mon, 11 Jul 2016 20:14:50 +0000 Subject: [PATCH] Return early from bus_dmamap_load callback if the error indicator is set. Reviewed by: andrew, manu --- sys/arm/allwinner/a10_mmc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/arm/allwinner/a10_mmc.c b/sys/arm/allwinner/a10_mmc.c index 461f1566aa95..aea5719febfd 100644 --- a/sys/arm/allwinner/a10_mmc.c +++ b/sys/arm/allwinner/a10_mmc.c @@ -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++) {