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/drm Fix error branch in drm_limit_dma_...
details: https://anonhg.NetBSD.org/src/rev/e038049a218c
branches: trunk
changeset: 329188:e038049a218c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed May 14 04:38:49 2014 +0000
description:
Fix error branch in drm_limit_dma_space.
diffstat:
sys/external/bsd/drm2/drm/drm_memory.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r d9cf52f78baf -r e038049a218c sys/external/bsd/drm2/drm/drm_memory.c
--- a/sys/external/bsd/drm2/drm/drm_memory.c Tue May 13 20:29:59 2014 +0000
+++ b/sys/external/bsd/drm2/drm/drm_memory.c Wed May 14 04:38:49 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_memory.c,v 1.2 2014/03/18 18:20:42 riastradh Exp $ */
+/* $NetBSD: drm_memory.c,v 1.3 2014/05/14 04:38:49 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_memory.c,v 1.2 2014/03/18 18:20:42 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_memory.c,v 1.3 2014/05/14 04:38:49 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "agp_i810.h"
@@ -253,7 +253,7 @@
drm_limit_dma_space(struct drm_device *dev, resource_size_t min_addr,
resource_size_t max_addr)
{
- int error;
+ int ret;
KASSERT(min_addr <= max_addr);
@@ -274,11 +274,13 @@
* the caller should try to allocate DMA-safe memory on failure
* anyway, but...paranoia).
*/
- error = bus_dmatag_subregion(dev->bus_dmat, min_addr, max_addr,
+ /* XXX errno NetBSD->Linux */
+ ret = -bus_dmatag_subregion(dev->bus_dmat, min_addr, max_addr,
&dev->dmat, BUS_DMA_WAITOK);
- if (error) {
+ if (ret) {
dev->dmat = dev->bus_dmat;
- return error;
+ dev->dmat_subregion_p = false;
+ return ret;
}
/*
Home |
Main Index |
Thread Index |
Old Index