diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2002-04-01 11:17:48 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2002-04-01 11:17:48 +0000 |
commit | 973474b8d9c77520430b4705dcd8a3f786f84809 (patch) | |
tree | eb0e9bbff75943a25d961167dd5655b72dd5e759 /sys/dev | |
parent | 4dc8c94e207c5130a68385f1c1c5aeccd68e8e14 (diff) |
Only call dc_ramdac_intr if initialized(). Fixes a panic when
starting Xtga. From NetBSD. ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/tga.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c index d47937eb5b7..eb8590890dc 100644 --- a/sys/dev/pci/tga.c +++ b/sys/dev/pci/tga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tga.c,v 1.12 2002/03/14 03:16:06 millert Exp $ */ +/* $OpenBSD: tga.c,v 1.13 2002/04/01 11:17:47 matthieu Exp $ */ /* $NetBSD: tga.c,v 1.31 2001/02/11 19:34:58 nathanw Exp $ */ /* @@ -668,8 +668,11 @@ tga_intr(v) return 0; } } - dc->dc_ramdac_intr(dcrc); - dc->dc_ramdac_intr = NULL; + /* if we have something to do, do it */ + if (dc->dc_ramdac_intr) { + dc->dc_ramdac_intr(dcrc); + dc->dc_ramdac_intr = NULL; + } TGAWREG(dc, TGA_REG_SISR, 0x00000001); TGAREGWB(dc, TGA_REG_SISR, 1); return (1); |