diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-12-06 18:02:59 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-12-06 18:02:59 +0000 |
commit | ff2276d112d535ff47a72fb79feb42e7b24c8826 (patch) | |
tree | f4102b631d2f1aaae2d587bedb9e13eda4104056 /sys/dev | |
parent | 216dbc36204b6eb1adcd02538f71c845cb71d4c4 (diff) |
Add missing short-circuit in bcmpcie_dmamap_load_raw().
ok patrick@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/fdt/bcm2711_pcie.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 <kettenis@openbsd.org> * @@ -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; |