Module Name: src
Committed By: riastradh
Date: Mon Aug 27 15:28:39 UTC 2018
Modified Files:
src/sys/external/bsd/drm2/pci: drm_pci.c
Log Message:
Work around broken null bus_dmatag_destroy expansion.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/external/bsd/drm2/pci/drm_pci.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/external/bsd/drm2/pci/drm_pci.c
diff -u src/sys/external/bsd/drm2/pci/drm_pci.c:1.26 src/sys/external/bsd/drm2/pci/drm_pci.c:1.27
--- src/sys/external/bsd/drm2/pci/drm_pci.c:1.26 Mon Aug 27 15:12:35 2018
+++ src/sys/external/bsd/drm2/pci/drm_pci.c Mon Aug 27 15:28:39 2018
@@ -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 @@ fail2: __unused
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 @@ drm_pci_detach(struct drm_device *dev, i
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);