If you insert a pccard modem and then eject it, you get a panic. This

happens because the sio device was never opened and com->tp is
therefore NULL.  ttygone can't swallow a NULL, so guard against that
possibility.  Other places in this function make similar checks, so I
believe this is correct.
This commit is contained in:
imp 2004-07-22 23:16:12 +00:00
parent f3c3c8c6c5
commit 5f9a1d0878

View File

@ -454,7 +454,8 @@ siodetach(dev)
return (0);
}
com->gone = TRUE;
ttygone(com->tp);
if (com->tp)
ttygone(com->tp);
for (i = 0 ; i < 6; i++)
destroy_dev(com->devs[i]);
if (com->irqres) {