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 Destroy the DMA subregion tag on e...
details: https://anonhg.NetBSD.org/src/rev/28c26d867dad
branches: trunk
changeset: 797446:28c26d867dad
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Jul 17 21:13:49 2014 +0000
description:
Destroy the DMA subregion tag on error in drm_pci_detach.
Now that drm_pci_attach calls the driver load function, rather than
deferring it to the caller, the DMA subregion tag can be created
here.
diffstat:
sys/external/bsd/drm2/pci/drm_pci.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 4d13e4c5d5cb -r 28c26d867dad sys/external/bsd/drm2/pci/drm_pci.c
--- a/sys/external/bsd/drm2/pci/drm_pci.c Thu Jul 17 20:56:14 2014 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci.c Thu Jul 17 21:13:49 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_pci.c,v 1.4 2014/07/16 20:56:25 riastradh Exp $ */
+/* $NetBSD: drm_pci.c,v 1.5 2014/07/17 21:13:49 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.4 2014/07/16 20:56:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.5 2014/07/17 21:13:49 riastradh Exp $");
#include <sys/types.h>
#include <sys/errno.h>
@@ -167,7 +167,8 @@
fail1: drm_pci_agp_destroy(dev);
dev->bus_nmaps = 0;
kmem_free(dev->bus_maps, PCI_NUM_RESOURCES * sizeof(dev->bus_maps[0]));
- KASSERT(!dev->dmat_subregion_p);
+ if (dev->dmat_subregion_p)
+ bus_dmatag_destroy(dev->dmat);
drm_dev_unref(dev);
fail0: return ret;
}
Home |
Main Index |
Thread Index |
Old Index