Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 make sure we have a cookie before we try to...



details:   https://anonhg.NetBSD.org/src/rev/42f30e33432a
branches:  trunk
changeset: 341243:42f30e33432a
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Oct 27 18:19:05 2015 +0000

description:
make sure we have a cookie before we try to clear it.

diffstat:

 sys/arch/x86/x86/bus_dma.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 85681976e2d0 -r 42f30e33432a sys/arch/x86/x86/bus_dma.c
--- a/sys/arch/x86/x86/bus_dma.c        Tue Oct 27 16:04:19 2015 +0000
+++ b/sys/arch/x86/x86/bus_dma.c        Tue Oct 27 18:19:05 2015 +0000
@@ -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 @@
        }
        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;
        }



Home | Main Index | Thread Index | Old Index