From: kettenis Date: Mon, 6 Dec 2021 18:02:58 +0000 (+0000) Subject: Add missing short-circuit in bcmpcie_dmamap_load_raw(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a8a0f5312628f812dc675fdd91fd18a6ca91ae77;p=openbsd Add missing short-circuit in bcmpcie_dmamap_load_raw(). ok patrick@ --- diff --git a/sys/dev/fdt/bcm2711_pcie.c b/sys/dev/fdt/bcm2711_pcie.c index 5e153e1340c..2c980dd3052 100644 --- a/sys/dev/fdt/bcm2711_pcie.c +++ b/sys/dev/fdt/bcm2711_pcie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcm2711_pcie.c,v 1.9 2021/12/04 16:08:02 kettenis Exp $ */ +/* $OpenBSD: bcm2711_pcie.c,v 1.10 2021/12/06 18:02:58 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis * @@ -551,6 +551,9 @@ bcmpcie_dmamap_load_raw(bus_dma_tag_t t, bus_dmamap_t map, if (error) return error; + if (sc->sc_dmaranges == NULL) + return 0; + /* For each segment. */ for (seg = 0; seg < map->dm_nsegs; seg++) { uint64_t addr = map->dm_segs[seg].ds_addr;