diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-08-14 10:32:18 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-08-14 10:32:18 +0000 |
commit | 1a677d06acc51e3db0435c21b79d153462735028 (patch) | |
tree | bbc0e86fd22f6f9cb294a5891698add1c1d28a80 /sys | |
parent | de712d68bb1c23aea8e2cdd30ad4e1b5df6bda9e (diff) |
Allow a bus_dmamap_sync() of length zero.
ok tedu@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm/arm/bus_dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/arm/arm/bus_dma.c b/sys/arch/arm/arm/bus_dma.c index cdd7c21282b..6f696146a71 100644 --- a/sys/arch/arm/arm/bus_dma.c +++ b/sys/arch/arm/arm/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.30 2016/05/16 15:13:50 kettenis Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.31 2016/08/14 10:32:17 kettenis Exp $ */ /* $NetBSD: bus_dma.c,v 1.38 2003/10/30 08:44:13 scw Exp $ */ /*- @@ -589,7 +589,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset, if (offset >= map->dm_mapsize) panic("_bus_dmamap_sync: bad offset %lu (map size is %lu)", offset, map->dm_mapsize); - if (len == 0 || (offset + len) > map->dm_mapsize) + if ((offset + len) > map->dm_mapsize) panic("_bus_dmamap_sync: bad length"); #endif |