summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2006-04-30 05:22:28 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2006-04-30 05:22:28 +0000
commit48fed6c50d2b2d7224153367e7fec4ee1f19598b (patch)
tree8e46c11315cc11893dbc6160741fa9d371793501 /sys/dev
parentbc6f5c595f8a0c454b5c8451b7fe0a3e6d0c9ce6 (diff)
rv not set. Sloppy but didn't matter.
pointed out by joris@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpibat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpibat.c b/sys/dev/acpi/acpibat.c
index 4676dc9c5f1..12194d79183 100644
--- a/sys/dev/acpi/acpibat.c
+++ b/sys/dev/acpi/acpibat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpibat.c,v 1.20 2006/03/05 04:47:25 marco Exp $ */
+/* $OpenBSD: acpibat.c,v 1.21 2006/04/30 05:22:27 marco Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -330,7 +330,7 @@ acpibat_getbst(struct acpibat_softc *sc)
{
struct aml_value res, env;
struct acpi_context *ctx;
- int rv;
+ int rv = 0;
lockmgr(&sc->sc_lock, LK_EXCLUSIVE, NULL);
@@ -342,12 +342,14 @@ acpibat_getbst(struct acpibat_softc *sc)
dnprintf(10, "%s: no _BST\n",
DEVNAME(sc));
printf("_bst fails\n");
+ rv = EINVAL;
goto out;
}
if (res.length != 4) {
printf("%s: invalid _BST, battery status not saved\n",
DEVNAME(sc));
+ rv = EINVAL;
goto out;
}