Mercurial > unleashed > wips
changeset 19590:2b8355c8681c
9576 hid_attach is missing one mutex_exit in error path
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
author | Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net> |
---|---|
date | Sat, 02 Jun 2018 10:18:58 +0000 |
parents | c0ac8d398775 |
children | 0a306c8a3b2d 98f7844f0552 |
files | usr/src/uts/common/io/usb/clients/hid/hid.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/usb/clients/hid/hid.c Wed May 30 12:38:16 2018 +0300 +++ b/usr/src/uts/common/io/usb/clients/hid/hid.c Sat Jun 02 10:18:58 2018 +0000 @@ -434,6 +434,7 @@ mutex_enter(&hidp->hid_mutex); if (usb_ep_xdescr_fill(USB_EP_XDESCR_CURRENT_VERSION, dip, ep_data, &hidp->hid_ep_intr_xdescr) != USB_SUCCESS) { + mutex_exit(&hidp->hid_mutex); goto fail; } @@ -1072,11 +1073,11 @@ { hid_state_t *hidp = (hid_state_t *)q->q_ptr; int error = USB_SUCCESS; - struct iocblk *iocbp; + struct iocblk *iocbp; mblk_t *datap; int direction; struct copyresp *crp; - queue_t *tmpq; + queue_t *tmpq; int flag; USB_DPRINTF_L4(PRINT_MASK_ALL, hidp->hid_log_handle, @@ -2576,7 +2577,7 @@ } ctrl_req->ctrl_bmRequestType = request_type; - ctrl_req->ctrl_bRequest = (uint8_t)request_request; + ctrl_req->ctrl_bRequest = (uint8_t)request_request; ctrl_req->ctrl_wValue = hid_request->hid_req_wValue; ctrl_req->ctrl_wIndex = request_index; ctrl_req->ctrl_wLength = hid_request->hid_req_wLength;