summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorjmcneill <jmcneill@NetBSD.org>2008-05-04 19:19:40 +0000
committerjmcneill <jmcneill@NetBSD.org>2008-05-04 19:19:40 +0000
commit7380b7991eacd7eb4eb24b29f9da5c8d4b16870b (patch)
tree1abd7ccc15959ca3066081cb59be52ecd8bd48b8 /sys/dev
parent34f7daa87e5b8edd4df282ec49cd38df9b5a830e (diff)
Returning EINVAL from drm_mmap isn't a smart thing to do.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/drm/drm_vm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/drm/drm_vm.c b/sys/dev/drm/drm_vm.c
index de91098f9a1..5fc0f617663 100644
--- a/sys/dev/drm/drm_vm.c
+++ b/sys/dev/drm/drm_vm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_vm.c,v 1.6 2007/12/11 11:17:32 lukem Exp $ */
+/* $NetBSD: drm_vm.c,v 1.7 2008/05/04 19:19:40 jmcneill Exp $ */
/*-
* Copyright 2003 Eric Anholt
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_vm.c,v 1.6 2007/12/11 11:17:32 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_vm.c,v 1.7 2008/05/04 19:19:40 jmcneill Exp $");
/*
__FBSDID("$FreeBSD: src/sys/dev/drm/drm_vm.c,v 1.2 2005/11/28 23:13:53 anholt Exp $");
*/
@@ -47,11 +47,11 @@ paddr_t drm_mmap(dev_t kdev, off_t offset, int prot)
DRM_UNLOCK();
if (priv == NULL) {
DRM_ERROR("can't find authenticator\n");
- return EINVAL;
+ return -1;
}
if (!priv->authenticated)
- return DRM_ERR(EACCES);
+ return -1;
if (dev->dma && offset >= 0 && offset < ptoa(dev->dma->page_count)) {
drm_device_dma_t *dma = dev->dma;