Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2010 18:53:22 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 173532 for review
Message-ID:  <201001221853.o0MIrMOm094868@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=173532

Change 173532 by hselasky@hselasky_laptop001 on 2010/01/22 18:52:27

	USB quirk:
		- add missing mutex unlocks after last patch.
		- patch by: HPS

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/quirk/usb_quirk.c#19 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/quirk/usb_quirk.c#19 (text+ko) ====

@@ -681,8 +681,10 @@
 		mtx_lock(&usb_quirk_mtx);
 		pqe = usb_quirk_get_entry(pgq->vid, pgq->pid,
 		    pgq->bcdDeviceLow, pgq->bcdDeviceHigh, 1);
-		if (pqe == NULL)
+		if (pqe == NULL) {
+			mtx_unlock(&usb_quirk_mtx);
 			return (EINVAL);
+		}
 		for (x = 0; x != USB_SUB_QUIRKS_MAX; x++) {
 			if (pqe->quirks[x] == UQ_NONE) {
 				pqe->quirks[x] = y;
@@ -717,8 +719,10 @@
 		mtx_lock(&usb_quirk_mtx);
 		pqe = usb_quirk_get_entry(pgq->vid, pgq->pid,
 		    pgq->bcdDeviceLow, pgq->bcdDeviceHigh, 0);
-		if (pqe == NULL)
+		if (pqe == NULL) {
+			mtx_unlock(&usb_quirk_mtx);
 			return (EINVAL);
+		}
 		for (x = 0; x != USB_SUB_QUIRKS_MAX; x++) {
 			if (pqe->quirks[x] == y) {
 				pqe->quirks[x] = UQ_NONE;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001221853.o0MIrMOm094868>