Module Name: src
Committed By: msaitoh
Date: Tue Jun 30 19:02:42 UTC 2020
Modified Files:
src/sys/dev/i2c: sdtemp.c
Log Message:
If an error occurred in sme_refresh function, pass ENVSYS_SINVALID.
OK'd by pgoyette.
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/i2c/sdtemp.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/i2c/sdtemp.c
diff -u src/sys/dev/i2c/sdtemp.c:1.38 src/sys/dev/i2c/sdtemp.c:1.39
--- src/sys/dev/i2c/sdtemp.c:1.38 Mon Jun 29 09:24:07 2020
+++ src/sys/dev/i2c/sdtemp.c Tue Jun 30 19:02:42 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: sdtemp.c,v 1.38 2020/06/29 09:24:07 msaitoh Exp $ */
+/* $NetBSD: sdtemp.c,v 1.39 2020/06/30 19:02:42 msaitoh Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.38 2020/06/29 09:24:07 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.39 2020/06/30 19:02:42 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -578,8 +578,10 @@ sdtemp_refresh(struct sysmon_envsys *sme
int error;
error = iic_acquire_bus(sc->sc_tag, 0);
- if (error)
+ if (error) {
+ edata->state = ENVSYS_SINVALID;
return;
+ }
error = sdtemp_read_16(sc, SDTEMP_REG_AMBIENT_TEMP, &val);
iic_release_bus(sc->sc_tag, 0);