lkml.org 
[lkml]   [2021]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v9 12/16] staging: r8188eu: Remove a test from usbctrl_vendorreq()
    Date
    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>
    ---
    drivers/staging/r8188eu/hal/usb_ops_linux.c | 6 ------
    1 file changed, 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 */
    --
    2.33.0
    \
     
     \ /
      Last update: 2021-09-21 20:20    [W:6.941 / U:0.292 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site