summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2015-10-18 00:33:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-17 20:56:10 -0700
commitac0a36679928e3e8d7cc0b4c2fd02fb368186992 (patch)
treea5b6c09f10a6f4a98cf0fe9280d2d32780addea8 /drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
parentd566e69024ac9d00ab7d0b0442ad2ba3ed4bd668 (diff)
staging: r8188eu: Add _enter_critical_mutex() error handling
_enter_critical_mutex() is a simple call to mutex_lock_interruptible(), but there is no error handling code for it. The patch removes wrapper _enter_critical_mutex() and adds error handling for mutex_lock_interruptible(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c')
-rw-r--r--drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
index 7e599bc5b2d3..0fea338d7313 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
@@ -249,7 +249,10 @@ static int usbctrl_vendorreq(struct adapter *adapt, u8 request, u16 value, u16 i
goto exit;
}
- _enter_critical_mutex(&dvobjpriv->usb_vendor_req_mutex, NULL);
+ if (mutex_lock_interruptible(&dvobjpriv->usb_vendor_req_mutex)) {
+ status = -ERESTARTSYS;
+ goto exit;
+ }
/* Acquire IO memory for vendorreq */
pIo_buf = dvobjpriv->usb_vendor_req_buf;