aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio M. De Francesco <fmdefrancesco@gmail.com>2021-09-24 14:27:01 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-27 17:37:12 +0200
commita6db0cd3d414c981fcf992026b75358f7ce23dd5 (patch)
tree1285860f3a08296e8a13b8d10919c0412f5a36a7
parentstaging: r8188eu: change the type of a variable in rtw_read16() (diff)
staging: r8188eu: Remove a test from usbctrl_vendorreq()
Remove an unnecessary 'if' test from usbctrl_vendorreq() because "length" is never greater than MAX_VENDOR_REQ_CMD_SIZE. Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-13-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/r8188eu/hal/usb_ops_linux.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
index 04a878c1a87d..b3f8a76b5db2 100644
--- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
@@ -23,12 +23,6 @@ static int usbctrl_vendorreq(struct intf_hdl *intf, u16 value, void *data, u16 l
goto exit;
}
- if (len > MAX_VENDOR_REQ_CMD_SIZE) {
- DBG_88E("[%s] Buffer len error ,vendor request failed\n", __func__);
- status = -EINVAL;
- goto exit;
- }
-
mutex_lock(&dvobjpriv->usb_vendor_req_mutex);
/* Acquire IO memory for vendorreq */