summaryrefslogtreecommitdiff
path: root/sys/arch/amiga/dev/grf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/amiga/dev/grf.c')
-rw-r--r--sys/arch/amiga/dev/grf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/arch/amiga/dev/grf.c b/sys/arch/amiga/dev/grf.c
index 4890ebe358d..ac6c11e24c7 100644
--- a/sys/arch/amiga/dev/grf.c
+++ b/sys/arch/amiga/dev/grf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: grf.c,v 1.23 1995/10/09 02:08:43 chopps Exp $ */
+/* $NetBSD: grf.c,v 1.23.2.1 1995/10/20 11:01:06 chopps Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -188,11 +188,9 @@ grfopen(dev, flags, devtype, p)
{
struct grf_softc *gp;
- if (GRFUNIT(dev) >= NGRF)
+ if (GRFUNIT(dev) >= NGRF || (gp = grfsp[GRFUNIT(dev)]) == NULL)
return(ENXIO);
- gp = grfsp[GRFUNIT(dev)];
-
if ((gp->g_flags & GF_ALIVE) == 0)
return(ENXIO);