From 522408357bee1c46723269b8278706420000ea2d Mon Sep 17 00:00:00 2001 From: jsg Date: Sun, 5 Dec 2021 15:35:32 +0000 Subject: [PATCH] add missing mtx_leave() calls in error paths ok anton@ --- sys/dev/usb/uhidpp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/uhidpp.c b/sys/dev/usb/uhidpp.c index 84bfc994b88..14ec6116f79 100644 --- a/sys/dev/usb/uhidpp.c +++ b/sys/dev/usb/uhidpp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidpp.c,v 1.19 2021/11/17 06:22:14 anton Exp $ */ +/* $OpenBSD: uhidpp.c,v 1.20 2021/12/05 15:35:32 jsg Exp $ */ /* * Copyright (c) 2021 Anton Lindqvist @@ -366,12 +366,14 @@ uhidpp_attach(struct device *parent, struct device *self, void *aux) error = uhidev_set_report_dev(sc->sc_hdev.sc_parent, &sc->sc_hdev, HIDPP_REPORT_ID_SHORT); if (error) { + mtx_leave(&sc->sc_mtx); printf(" short report error %d\n", error); return; } error = uhidev_set_report_dev(sc->sc_hdev.sc_parent, &sc->sc_hdev, HIDPP_REPORT_ID_LONG); if (error) { + mtx_leave(&sc->sc_mtx); printf(" long report error %d\n", error); return; } -- 2.20.1