Return instead of crashing. This is wrong, and should be fixed properly.

This commit is contained in:
christos 2016-03-07 00:16:48 +00:00
parent bd45646f1b
commit d2b754e0c5

View File

@ -1,4 +1,4 @@
/* $NetBSD: iommu.c,v 1.111 2016/03/07 00:11:33 christos Exp $ */
/* $NetBSD: iommu.c,v 1.112 2016/03/07 00:16:48 christos Exp $ */
/*
* Copyright (c) 1999, 2000 Matthew R. Green
@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.111 2016/03/07 00:11:33 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.112 2016/03/07 00:16:48 christos Exp $");
#include "opt_ddb.h"
@ -746,11 +746,10 @@ iommu_dvmamap_unload(bus_dma_tag_t t, bus_dmamap_t map)
bus_size_t sgsize = map->_dm_dvmasize;
/* Flush the iommu */
#ifdef DEBUG
if (!map->_dm_dvmastart) {
printf("iommu_dvmamap_unload: No dvmastart is zero\n");
printf("%s: error dvmastart is zero!\n", __func__);
return;
}
#endif
iommu_remove(is, map->_dm_dvmastart, map->_dm_dvmasize);
/* Flush the caches */