summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/i386at_ds_routines.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/i386/i386at/i386at_ds_routines.c b/i386/i386at/i386at_ds_routines.c
index be1f58d..2a52a67 100644
--- a/i386/i386at/i386at_ds_routines.c
+++ b/i386/i386at/i386at_ds_routines.c
@@ -1,4 +1,4 @@
-/*
+/*
* Mach device server routines (i386at version).
*
* Copyright (c) 1996 The University of Utah and
@@ -273,6 +273,8 @@ device_reference (device_t dev)
void
device_deallocate (device_t dev)
{
+ if (dev == DEVICE_NULL)
+ return;
if (dev->emul_ops->dealloc)
(*dev->emul_ops->dealloc) (dev->emul_data);
}