From d2b754e0c54d70dbce68a5d758b0a2417e7198cc Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 7 Mar 2016 00:16:48 +0000 Subject: [PATCH] Return instead of crashing. This is wrong, and should be fixed properly. --- sys/arch/sparc64/dev/iommu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/arch/sparc64/dev/iommu.c b/sys/arch/sparc64/dev/iommu.c index f9716b4d3ab8..35cfc67101a9 100644 --- a/sys/arch/sparc64/dev/iommu.c +++ b/sys/arch/sparc64/dev/iommu.c @@ -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 -__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 */