diff options
| author | xtraeme <xtraeme@NetBSD.org> | 2008-04-04 09:30:55 +0000 |
|---|---|---|
| committer | xtraeme <xtraeme@NetBSD.org> | 2008-04-04 09:30:55 +0000 |
| commit | 6f1c8ce653f10eed7fa9ef9d8a7a9f43dbfad953 (patch) | |
| tree | 3c0e4cc06426054f3cfbd8588e649d8bf882bc22 /sys/dev | |
| parent | f5c7cd24910f20f984ab91fb4d0546bbbcc18b21 (diff) | |
Don't forget to unmap I/O space in the error paths.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/isa/ug_isa.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/isa/ug_isa.c b/sys/dev/isa/ug_isa.c index b36899103c8..822c29ea8f1 100644 --- a/sys/dev/isa/ug_isa.c +++ b/sys/dev/isa/ug_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: ug_isa.c,v 1.6 2008/03/26 16:09:37 xtraeme Exp $ */ +/* $NetBSD: ug_isa.c,v 1.7 2008/04/04 09:30:55 xtraeme Exp $ */ /* * Copyright (c) 2007 Mihai Chelaru <kefren@netbsd.ro> @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ug_isa.c,v 1.6 2008/03/26 16:09:37 xtraeme Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ug_isa.c,v 1.7 2008/04/04 09:30:55 xtraeme Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -153,7 +153,7 @@ ug_isa_attach(device_t parent, device_t self, void *aux) if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_sensor[i])) { sysmon_envsys_destroy(sc->sc_sme); - return; + goto out; } } @@ -163,8 +163,14 @@ ug_isa_attach(device_t parent, device_t self, void *aux) if (sysmon_envsys_register(sc->sc_sme)) { aprint_error_dev(self, "unable to register with sysmon\n"); sysmon_envsys_destroy(sc->sc_sme); + goto out; } + return; + +out: + bus_space_unmap(sc->sc_iot, sc->sc_ioh, 8); + } static int |
