Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/pci Work around broken null bus_dmatag...



details:   https://anonhg.NetBSD.org/src/rev/e99162a2d6f9
branches:  trunk
changeset: 366417:e99162a2d6f9
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 15:28:39 2018 +0000

description:
Work around broken null bus_dmatag_destroy expansion.

diffstat:

 sys/external/bsd/drm2/pci/drm_pci.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r a0ab5f40394c -r e99162a2d6f9 sys/external/bsd/drm2/pci/drm_pci.c
--- a/sys/external/bsd/drm2/pci/drm_pci.c       Mon Aug 27 15:28:27 2018 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci.c       Mon Aug 27 15:28:39 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_pci.c,v 1.26 2018/08/27 15:12:35 riastradh Exp $   */
+/*     $NetBSD: drm_pci.c,v 1.27 2018/08/27 15:28:39 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.26 2018/08/27 15:12:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.27 2018/08/27 15:28:39 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -153,8 +153,9 @@
 fail1: drm_pci_agp_destroy(dev);
        dev->bus_nmaps = 0;
        kmem_free(dev->bus_maps, PCI_NUM_RESOURCES * sizeof(dev->bus_maps[0]));
-       if (dev->dmat_subregion_p)
+       if (dev->dmat_subregion_p) {
                bus_dmatag_destroy(dev->dmat);
+       }
        drm_dev_unref(dev);
 fail0: return ret;
 }
@@ -174,8 +175,9 @@
        kmem_free(dev->bus_maps, PCI_NUM_RESOURCES * sizeof(dev->bus_maps[0]));
 
        /* Tear down bus space and bus DMA tags.  */
-       if (dev->dmat_subregion_p)
+       if (dev->dmat_subregion_p) {
                bus_dmatag_destroy(dev->dmat);
+       }
 
        drm_dev_unref(dev);
 



Home | Main Index | Thread Index | Old Index