diff options
author | bde <bde@FreeBSD.org> | 1999-03-03 14:38:07 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-03-03 14:38:07 +0000 |
commit | c77c7ecbb23680113a0e7a3b4444ec5fced9bf58 (patch) | |
tree | e9c3ef72bd29ddb98b806e739757795342541f33 /sys/i386/isa | |
parent | 6be72cc099e943c12e5f3b7cf89b84cd43e8e057 (diff) | |
download | FreeBSD-src-c77c7ecbb23680113a0e7a3b4444ec5fced9bf58.zip FreeBSD-src-c77c7ecbb23680113a0e7a3b4444ec5fced9bf58.tar.gz |
Fixed null pointer panic for misconfigured master ports.
PR: i386/10273
Submitted by: Stephen Kiernan <sab@yin.vegamuse.org>
Diffstat (limited to 'sys/i386/isa')
-rw-r--r-- | sys/i386/isa/sio.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c index 5da25f1..9beff3c 100644 --- a/sys/i386/isa/sio.c +++ b/sys/i386/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.227 1999/02/04 13:45:14 bde Exp $ + * $Id: sio.c,v 1.228 1999/02/04 15:24:29 bde Exp $ */ #include "opt_comconsole.h" @@ -854,6 +854,9 @@ sioattach(isdp) #ifdef COM_ESP Port_t *espp; #endif +#ifdef COM_MULTIPORT + struct isa_device *idev; +#endif Port_t iobase; int s; int unit; @@ -1032,8 +1035,9 @@ determined_type: ; if (unit == COM_MPMASTER(isdp)) printf(" master"); printf(")"); - com->no_irq = find_isadev(isa_devtab_tty, &siodriver, - COM_MPMASTER(isdp))->id_irq == 0; + idev = find_isadev(isa_devtab_tty, &siodriver, + COM_MPMASTER(isdp)); + com->no_irq = (idev == NULL || idev->id_irq == 0); } #endif /* COM_MULTIPORT */ if (unit == comconsole) |