From 2fdedeeb22f12b1e1c35014cd2d74f40a9e826e9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 23 Nov 2001 22:25:27 +0000 Subject: 2001-11-23 Roland McGrath * i386/i386at/i386at_ds_routines.c (device_deallocate): Do nothing if argument is DEVICE_NULL. --- i386/i386at/i386at_ds_routines.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3