summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpitoshiba.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-09-07 11:23:18 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-09-07 11:23:18 +0000
commitd21d4bc4201a0165ecfe2165c9e32ed32b92a5e2 (patch)
tree98c7ac3d456c430f639908d432ae503318ef0b99 /sys/dev/acpi/acpitoshiba.c
parent2a65d54e7bb8b2870ec488951b2a143b57caa0a7 (diff)
In toshiba_hotkey() initialize the ret value to failure as it is
not set in all code paths. found by clang -Wuninitialized; OK deraadt@
Diffstat (limited to 'sys/dev/acpi/acpitoshiba.c')
-rw-r--r--sys/dev/acpi/acpitoshiba.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpitoshiba.c b/sys/dev/acpi/acpitoshiba.c
index 5e1f5864b93..47507ae3434 100644
--- a/sys/dev/acpi/acpitoshiba.c
+++ b/sys/dev/acpi/acpitoshiba.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpitoshiba.c,v 1.8 2017/02/28 10:39:07 natano Exp $ */
+/* $OpenBSD: acpitoshiba.c,v 1.9 2017/09/07 11:23:17 bluhm Exp $ */
/*-
* Copyright (c) 2003 Hiroyuki Aizu <aizu@navi.org>
* All rights reserved.
@@ -381,7 +381,7 @@ int
toshiba_hotkey(struct aml_node *node, int notify, void *arg)
{
struct acpitoshiba_softc *sc = arg;
- int event, ret;
+ int event, ret = HCI_FAILURE;
event = toshiba_read_events(sc);
if (!event)