diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-12-21 07:44:23 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-12-21 07:44:23 +0000 |
commit | 3a1eac8589ef3d5f6ca3f5e7ef33f21986eba613 (patch) | |
tree | 65c615be857511ac7208e2ae66ca1cbb85cee236 /sys | |
parent | 95d4c144552bd99e5df7ace2946b23d4555720dc (diff) |
avoid returning uninitialised var in hidpp_send_report()
ok anton@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/uhidpp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uhidpp.c b/sys/dev/usb/uhidpp.c index 14ec6116f79..d953c7af637 100644 --- a/sys/dev/usb/uhidpp.c +++ b/sys/dev/usb/uhidpp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidpp.c,v 1.20 2021/12/05 15:35:32 jsg Exp $ */ +/* $OpenBSD: uhidpp.c,v 1.21 2021/12/21 07:44:22 jsg Exp $ */ /* * Copyright (c) 2021 Anton Lindqvist <anton@openbsd.org> @@ -1207,7 +1207,7 @@ int hidpp_send_report(struct uhidpp_softc *sc, uint8_t report_id, struct uhidpp_report *req, struct uhidpp_report *resp) { - int error, len, n; + int error = 0, len, n; MUTEX_ASSERT_LOCKED(&sc->sc_mtx); |