Module Name: src
Committed By: mlelstv
Date: Mon Aug 1 14:43:15 UTC 2022
Modified Files:
src/sys/dev/ic: nslm7x.c
Log Message:
revert accidental commit.
To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/ic/nslm7x.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/nslm7x.c
diff -u src/sys/dev/ic/nslm7x.c:1.75 src/sys/dev/ic/nslm7x.c:1.76
--- src/sys/dev/ic/nslm7x.c:1.75 Mon Aug 1 07:34:28 2022
+++ src/sys/dev/ic/nslm7x.c Mon Aug 1 14:43:15 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: nslm7x.c,v 1.75 2022/08/01 07:34:28 mlelstv Exp $ */
+/* $NetBSD: nslm7x.c,v 1.76 2022/08/01 14:43:15 mlelstv Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.75 2022/08/01 07:34:28 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.76 2022/08/01 14:43:15 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2247,7 +2247,6 @@ lm_attach(struct lm_softc *lmsc)
if ((rv = sysmon_envsys_sensor_attach(lmsc->sc_sme,
&lmsc->sensors[i])) != 0) {
sysmon_envsys_destroy(lmsc->sc_sme);
- lmsc->sc_sme = NULL;
aprint_error_dev(lmsc->sc_dev,
"sysmon_envsys_sensor_attach() returned %d\n", rv);
return;
@@ -2271,7 +2270,6 @@ lm_attach(struct lm_softc *lmsc)
aprint_error_dev(lmsc->sc_dev,
"unable to register with sysmon\n");
sysmon_envsys_destroy(lmsc->sc_sme);
- lmsc->sc_sme = NULL;
}
if (!pmf_device_register(lmsc->sc_dev, NULL, NULL))
aprint_error_dev(lmsc->sc_dev,
@@ -2287,9 +2285,7 @@ lm_detach(struct lm_softc *lmsc)
{
callout_halt(&lmsc->sc_callout, NULL);
callout_destroy(&lmsc->sc_callout);
-
- if (lmsc->sc_sme != NULL)
- sysmon_envsys_unregister(lmsc->sc_sme);
+ sysmon_envsys_unregister(lmsc->sc_sme);
pmf_device_deregister(lmsc->sc_dev);
}