[PATCH v8 03/19] staging: r8188eu: remove unnecessary test in usbctrl_vendorreq()
From: Fabio M. De Francesco
Date: Sun Sep 19 2021 - 19:54:56 EST
Remove unnecessary test for "!io_buf" in usbctrl_vendorreq(). Remove the
no more used "release_mutex:" label.
Co-developed-by: Pavel Skripkin <paskripkin@xxxxxxxxx>
Signed-off-by: Pavel Skripkin <paskripkin@xxxxxxxxx>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@xxxxxxxxx>
---
drivers/staging/r8188eu/hal/usb_ops_linux.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
index e06aea92c8d2..d92bdcc3716d 100644
--- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
@@ -34,12 +34,6 @@ static int usbctrl_vendorreq(struct intf_hdl *intfhdl, u16 value, void *data, u1
/* Acquire IO memory for vendorreq */
io_buf = dvobjpriv->usb_vendor_req_buf;
- if (!io_buf) {
- DBG_88E("[%s] io_buf == NULL\n", __func__);
- status = -ENOMEM;
- goto release_mutex;
- }
-
if (requesttype == REALTEK_USB_VENQT_READ)
pipe = usb_rcvctrlpipe(udev, 0);/* read_in */
else
@@ -91,7 +85,7 @@ static int usbctrl_vendorreq(struct intf_hdl *intfhdl, u16 value, void *data, u1
if ((value >= FW_8188E_START_ADDRESS && value <= FW_8188E_END_ADDRESS) || status == len)
break;
}
-release_mutex:
+
mutex_unlock(&dvobjpriv->usb_vendor_req_mutex);
exit:
return status;
--
2.33.0