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/dist/drm/nouveau/core/engine/device Re...
details: https://anonhg.NetBSD.org/src/rev/f70632aa2d24
branches: trunk
changeset: 341423:f70632aa2d24
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Nov 05 20:31:26 2015 +0000
description:
Return error from bus_space_map.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c | 17 +++++----
1 files changed, 10 insertions(+), 7 deletions(-)
diffs (46 lines):
diff -r f2252ed62cb4 -r f70632aa2d24 sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c Thu Nov 05 20:26:10 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c Thu Nov 05 20:31:26 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_engine_device_base.c,v 1.6 2015/11/05 20:26:10 riastradh Exp $ */
+/* $NetBSD: nouveau_engine_device_base.c,v 1.7 2015/11/05 20:31:26 riastradh Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_device_base.c,v 1.6 2015/11/05 20:26:10 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_device_base.c,v 1.7 2015/11/05 20:31:26 riastradh Exp $");
#include <core/object.h>
#include <core/device.h>
@@ -177,8 +177,10 @@
if (!(args->disable & NV_DEVICE_DISABLE_IDENTIFY) &&
!device->card_type) {
#ifdef __NetBSD__
- if (bus_space_map(mmiot, mmio_base, mmio_size, 0, &mmioh) != 0)
- return -ENOMEM;
+ /* XXX errno NetBSD->Linux */
+ ret = -bus_space_map(mmiot, mmio_base, mmio_size, 0, &mmioh);
+ if (ret)
+ return ret;
#ifndef __BIG_ENDIAN
if (bus_space_read_4(mmiot, mmioh, 4) != 0)
@@ -293,10 +295,11 @@
#ifdef __NetBSD__
if (!(args->disable & NV_DEVICE_DISABLE_MMIO) &&
!nv_subdev(device)->mmiosz) {
- if (bus_space_map(mmiot, mmio_base, mmio_size, 0, &mmioh)
- != 0) {
+ /* XXX errno NetBSD->Linux */
+ ret = -bus_space_map(mmiot, mmio_base, mmio_size, 0, &mmioh);
+ if (ret) {
nv_error(device, "unable to map device registers\n");
- return -ENOMEM;
+ return ret;
}
nv_subdev(device)->mmiot = mmiot;
nv_subdev(device)->mmioh = mmioh;
Home |
Main Index |
Thread Index |
Old Index