From: jsg Date: Tue, 21 Dec 2021 07:44:22 +0000 (+0000) Subject: avoid returning uninitialised var in hidpp_send_report() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=731cc6c2f966e11cffeaffcdf8724a7a51e37d8c;p=openbsd avoid returning uninitialised var in hidpp_send_report() ok anton@ --- 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 @@ -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);