From: Fabio M. De Francesco Date: Fri, 24 Sep 2021 12:27:01 +0000 (+0200) Subject: staging: r8188eu: Remove a test from usbctrl_vendorreq() X-Git-Tag: v6.1-rc5~2729^2~206 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6db0cd3d414c981fcf992026b75358f7ce23dd5;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Pavel Skripkin Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210924122705.3781-13-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c index 04a878c..b3f8a76 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 */