diff options
| author | mlelstv <mlelstv@NetBSD.org> | 2022-06-29 15:58:12 +0000 |
|---|---|---|
| committer | mlelstv <mlelstv@NetBSD.org> | 2022-06-29 15:58:12 +0000 |
| commit | 477acddb0d5129bf0ca2073d9dce5b85df393a44 (patch) | |
| tree | 6e13c3b57bef7813d987d72183292cdee75901c0 /sys/dev/ic | |
| parent | d7180b481ec0812a6ebe47ab13346d354a2edbdd (diff) | |
Don't unregister sensors twice.
Diffstat (limited to 'sys/dev/ic')
| -rw-r--r-- | sys/dev/ic/apple_smc_fan.c | 5 | ||||
| -rw-r--r-- | sys/dev/ic/apple_smc_temp.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/ic/apple_smc_fan.c b/sys/dev/ic/apple_smc_fan.c index 081ebed9697..93a94622866 100644 --- a/sys/dev/ic/apple_smc_fan.c +++ b/sys/dev/ic/apple_smc_fan.c @@ -1,4 +1,4 @@ -/* $NetBSD: apple_smc_fan.c,v 1.5 2015/04/23 23:23:00 pgoyette Exp $ */ +/* $NetBSD: apple_smc_fan.c,v 1.6 2022/06/29 15:58:12 mlelstv Exp $ */ /* * Apple System Management Controller: Fans @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: apple_smc_fan.c,v 1.5 2015/04/23 23:23:00 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apple_smc_fan.c,v 1.6 2022/06/29 15:58:12 mlelstv Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -218,7 +218,6 @@ apple_smc_fan_detach(device_t self, int flags) /* If we registered with sysmon_envsys, unregister. */ if (sc->sc_sme != NULL) { sysmon_envsys_unregister(sc->sc_sme); - sc->sc_sme = NULL; KASSERT(sc->sc_fans != NULL); KASSERT(sc->sc_nfans > 0); diff --git a/sys/dev/ic/apple_smc_temp.c b/sys/dev/ic/apple_smc_temp.c index 66190708da5..05cf93a166b 100644 --- a/sys/dev/ic/apple_smc_temp.c +++ b/sys/dev/ic/apple_smc_temp.c @@ -1,4 +1,4 @@ -/* $NetBSD: apple_smc_temp.c,v 1.5 2015/04/23 23:23:00 pgoyette Exp $ */ +/* $NetBSD: apple_smc_temp.c,v 1.6 2022/06/29 15:58:12 mlelstv Exp $ */ /* * Apple System Management Controller: Temperature Sensors @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: apple_smc_temp.c,v 1.5 2015/04/23 23:23:00 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apple_smc_temp.c,v 1.6 2022/06/29 15:58:12 mlelstv Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -153,7 +153,6 @@ apple_smc_temp_detach(device_t self, int flags) /* If we registered with sysmon_envsys, unregister. */ if (sc->sc_sme != NULL) { sysmon_envsys_unregister(sc->sc_sme); - sc->sc_sme = NULL; KASSERT(sc->sc_sensors != NULL); KASSERT(sc->sc_nsensors > 0); |
