diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-02-26 17:24:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-02-26 17:24:12 +0000 |
commit | 955b86ad4b263729cf0ed78e63f04de9284be699 (patch) | |
tree | e1208c3508ddf050a1896fed03dd452361645755 /sys | |
parent | 676c8435f8b01ed928e57dd27ed6249aa2c99e6b (diff) |
initialise 's' before first use in the unlikely error path; from cnst
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpi/atk0110.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/acpi/atk0110.c b/sys/dev/acpi/atk0110.c index fd77224db30..2a2e698ad2c 100644 --- a/sys/dev/acpi/atk0110.c +++ b/sys/dev/acpi/atk0110.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atk0110.c,v 1.2 2010/01/04 17:30:23 deraadt Exp $ */ +/* $OpenBSD: atk0110.c,v 1.3 2010/02/26 17:24:11 deraadt Exp $ */ /* * Copyright (c) 2009 Constantine A. Murenin <cnst+openbsd@bugmail.mojo.ru> @@ -312,8 +312,9 @@ aibs_refresh_r(struct aibs_softc *sc, enum sensor_type st) for (i = 0; i < n; i++) { struct aml_value req, res; - struct ksensor *s; - int64_t v, l, h; + int64_t v; + struct ksensor *s = &as[i].s; + const int64_t l = as[i].l, h = as[i].h; req.type = AML_OBJTYPE_INTEGER; req.v_integer = as[i].i; @@ -331,11 +332,8 @@ aibs_refresh_r(struct aibs_softc *sc, enum sensor_type st) s->flags |= SENSOR_FINVALID; continue; } - v = res.v_integer; - s = &as[i].s; - l = as[i].l; - h = as[i].h; + aml_freevalue(&res); switch (st) { case SENSOR_TEMP: @@ -375,7 +373,6 @@ aibs_refresh_r(struct aibs_softc *sc, enum sensor_type st) /* NOTREACHED */ break; } - aml_freevalue(&res); } return; |