diff options
author | phk <phk@FreeBSD.org> | 1998-06-24 09:23:32 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-06-24 09:23:32 +0000 |
commit | f07cfaed29f9b061b8c1cf6d3e5895b9c21cedde (patch) | |
tree | a5f741dc08e2e3a487a98dbfce5a618d82992dad /sys/isa/sio.c | |
parent | 5ed7f2c4ee2d5354eb7844c995ea1967ef819b77 (diff) | |
download | FreeBSD-src-f07cfaed29f9b061b8c1cf6d3e5895b9c21cedde.zip FreeBSD-src-f07cfaed29f9b061b8c1cf6d3e5895b9c21cedde.tar.gz |
Avoid some panics in sio_unload which gets called with various dirt
if the attach of a modem card failed.
Diffstat (limited to 'sys/isa/sio.c')
-rw-r--r-- | sys/isa/sio.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/isa/sio.c b/sys/isa/sio.c index a836201..12b149a 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.206 1998/06/07 17:10:58 dfr Exp $ + * $Id: sio.c,v 1.207 1998/06/16 11:05:59 bde Exp $ */ #include "opt_comconsole.h" @@ -528,7 +528,15 @@ siounload(struct pccard_devinfo *devi) { struct com_s *com; + if (!devi) { + printf("NULL devi in siounload\n"); + return; + } com = com_addr(devi->isahd.id_unit); + if (!com) { + printf("NULL com in siounload\n"); + return; + } if (!com->iobase) { printf("sio%d already unloaded!\n",devi->isahd.id_unit); return; |