diff options
author | yokota <yokota@FreeBSD.org> | 1997-05-27 11:55:41 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 1997-05-27 11:55:41 +0000 |
commit | 41dc0592de4252f377f830504efc1098ae130e43 (patch) | |
tree | b2888e15e0f7065aa5345c010e871c96c9777eac /sys/i386/isa/psm.c | |
parent | fa1c15c6c4f0faf3427ccbb69452ee01795c9058 (diff) | |
download | FreeBSD-src-41dc0592de4252f377f830504efc1098ae130e43.zip FreeBSD-src-41dc0592de4252f377f830504efc1098ae130e43.tar.gz |
scprobe() referred to the psm_softc structure even after it was
freed ;-<
PR: kern/3694
Diffstat (limited to 'sys/i386/isa/psm.c')
-rw-r--r-- | sys/i386/isa/psm.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/i386/isa/psm.c b/sys/i386/isa/psm.c index ffb5caa..5e28708 100644 --- a/sys/i386/isa/psm.c +++ b/sys/i386/isa/psm.c @@ -19,7 +19,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: psm.c,v 1.37 1997/02/22 09:37:01 peter Exp $ + * $Id: psm.c,v 1.38 1997/03/23 03:34:56 bde Exp $ */ /* @@ -475,6 +475,7 @@ reinitialize(dev_t dev, mousemode_t *mode) --verbose; \ kbdc_set_device_mask(sc->kbdc, mask); \ kbdc_lock(sc->kbdc, FALSE); \ + free(sc, M_DEVBUF); \ return (v); \ } @@ -506,6 +507,7 @@ psmprobe(struct isa_device *dvp) printf("psm%d: unable to lock the controller.\n", unit); if (bootverbose) --verbose; + free(sc, M_DEVBUF); return (0); } @@ -553,7 +555,6 @@ psmprobe(struct isa_device *dvp) /* CONTROLLER ERROR */ printf("psm%d: unable to get the current command byte value.\n", unit); - free(sc, M_DEVBUF); endprobe(0); } @@ -571,7 +572,6 @@ psmprobe(struct isa_device *dvp) */ restore_controller(sc->kbdc, command_byte); printf("psm%d: unable to set the command byte.\n", unit); - free(sc, M_DEVBUF); endprobe(0); } @@ -606,7 +606,6 @@ psmprobe(struct isa_device *dvp) if (verbose) printf("psm%d: the aux port is not functioning (%d).\n", unit, i); - free(sc, M_DEVBUF); endprobe(0); } @@ -619,7 +618,6 @@ psmprobe(struct isa_device *dvp) restore_controller(sc->kbdc, command_byte); if (verbose) printf("psm%d: failed to reset the aux device.\n", unit); - free(sc, M_DEVBUF); endprobe(0); } /* @@ -633,7 +631,6 @@ psmprobe(struct isa_device *dvp) restore_controller(sc->kbdc, command_byte); if (verbose) printf("psm%d: failed to enable the aux device.\n", unit); - free(sc, M_DEVBUF); endprobe(0); } @@ -658,7 +655,6 @@ psmprobe(struct isa_device *dvp) restore_controller(sc->kbdc, command_byte); if (verbose) printf("psm%d: unknown device type (%d).\n", unit, sc->hw.hwid); - free(sc, M_DEVBUF); endprobe(0); } switch (sc->hw.hwid) { @@ -713,7 +709,6 @@ psmprobe(struct isa_device *dvp) */ restore_controller(sc->kbdc, command_byte); printf("psm%d: unable to set the command byte.\n", unit); - free(sc, M_DEVBUF); endprobe(0); } @@ -751,8 +746,11 @@ psmattach(struct isa_device *dvp) DV_CHR, 0, 0, 0666, "npsm%d", unit); #endif - printf("psm%d: device ID %d, %d buttons\n", - unit, sc->hw.hwid, sc->hw.buttons); + if (verbose) + printf("psm%d: device ID %d, %d buttons\n", + unit, sc->hw.hwid, sc->hw.buttons); + else + printf("psm%d: device ID %d\n", unit, sc->hw.hwid); if (bootverbose) --verbose; |