Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c If an error occurred in sme_refresh function, pa...
details: https://anonhg.NetBSD.org/src/rev/f012d92b90f5
branches: trunk
changeset: 935345:f012d92b90f5
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Jun 30 19:02:42 2020 +0000
description:
If an error occurred in sme_refresh function, pass ENVSYS_SINVALID.
OK'd by pgoyette.
diffstat:
sys/dev/i2c/sdtemp.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 325f368fe213 -r f012d92b90f5 sys/dev/i2c/sdtemp.c
--- a/sys/dev/i2c/sdtemp.c Tue Jun 30 17:03:13 2020 +0000
+++ b/sys/dev/i2c/sdtemp.c Tue Jun 30 19:02:42 2020 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index