summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Wiedenroth <sebastian.wiedenroth@skylime.net>2018-06-02 10:18:58 +0000
committerHans Rosenfeld <hans.rosenfeld@joyent.com>2018-06-04 10:35:40 +0200
commitdb1c88f6dab43484b6c33636600ac4596ff4c354 (patch)
tree3927de29a8c9c0e28d5fd602dc760f92f587048b
parentea4ea50f064c5468142b24627acad09a41f060cb (diff)
downloadillumos-joyent-db1c88f6dab43484b6c33636600ac4596ff4c354.tar.gz
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>
-rw-r--r--usr/src/uts/common/io/usb/clients/hid/hid.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr/src/uts/common/io/usb/clients/hid/hid.c b/usr/src/uts/common/io/usb/clients/hid/hid.c
index 249941d03c..084fa7fedc 100644
--- a/usr/src/uts/common/io/usb/clients/hid/hid.c
+++ b/usr/src/uts/common/io/usb/clients/hid/hid.c
@@ -434,6 +434,7 @@ hid_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
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_wput(queue_t *q, mblk_t *mp)
{
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 @@ hid_send_async_ctrl_request(hid_default_pipe_arg_t *hid_default_pipe_arg,
}
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;