From 731cc6c2f966e11cffeaffcdf8724a7a51e37d8c Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 21 Dec 2021 07:44:22 +0000 Subject: [PATCH] avoid returning uninitialised var in hidpp_send_report() ok anton@ --- sys/dev/usb/uhidpp.c | 4 ++-- 1 file 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 @@ -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); -- 2.20.1