Module Name: src Committed By: christos Date: Tue Oct 27 18:19:05 UTC 2015
Modified Files: src/sys/arch/x86/x86: bus_dma.c Log Message: make sure we have a cookie before we try to clear it. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/arch/x86/x86/bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/bus_dma.c diff -u src/sys/arch/x86/x86/bus_dma.c:1.72 src/sys/arch/x86/x86/bus_dma.c:1.73 --- src/sys/arch/x86/x86/bus_dma.c:1.72 Tue Oct 27 11:53:58 2015 +++ src/sys/arch/x86/x86/bus_dma.c Tue Oct 27 14:19:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.72 2015/10/27 15:53:58 christos Exp $ */ +/* $NetBSD: bus_dma.c,v 1.73 2015/10/27 18:19:05 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.72 2015/10/27 15:53:58 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.73 2015/10/27 18:19:05 christos Exp $"); /* * The following is included because _bus_dma_uiomove is derived from @@ -397,7 +397,8 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm } error = _bus_dmamap_load_buffer(t, map, buf, buflen, vm, flags); if (error == 0) { - cookie->id_flags &= ~X86_DMA_IS_BOUNCING; + if (cookie != NULL) + cookie->id_flags &= ~X86_DMA_IS_BOUNCING; map->dm_mapsize = buflen; return 0; }