artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7537a7c
)
Add missing short-circuit in bcmpcie_dmamap_load_raw().
author
kettenis
<kettenis@openbsd.org>
Mon, 6 Dec 2021 18:02:58 +0000
(18:02 +0000)
committer
kettenis
<kettenis@openbsd.org>
Mon, 6 Dec 2021 18:02:58 +0000
(18:02 +0000)
ok patrick@
sys/dev/fdt/bcm2711_pcie.c
patch
|
blob
|
history
diff --git
a/sys/dev/fdt/bcm2711_pcie.c
b/sys/dev/fdt/bcm2711_pcie.c
index
5e153e1
..
2c980dd
100644
(file)
--- 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;