diff options
author | Johan Hovold <johan@kernel.org> | 2020-12-04 09:51:09 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-04 16:48:42 +0100 |
commit | baf7df456b3848e4b6f8648e754e3a0f77fe700e (patch) | |
tree | 9f3c7d2ff8e07a185ecb1c52bd7fe0b50f9b9f2e /drivers | |
parent | cf5fbe02042e52a5a3d93223770db39002b313c6 (diff) | |
download | linux-stable-baf7df456b3848e4b6f8648e754e3a0f77fe700e.tar.gz linux-stable-baf7df456b3848e4b6f8648e754e3a0f77fe700e.tar.bz2 linux-stable-baf7df456b3848e4b6f8648e754e3a0f77fe700e.zip |
USB: core: drop short-transfer check from usb_control_msg_send()
A failure to send a complete control message is always an error so
there's no need to check for short transfers in usb_control_msg_send().
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20201204085110.20055-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/message.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index c4e876050074..0d8f75e94d46 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -219,9 +219,8 @@ int usb_control_msg_send(struct usb_device *dev, __u8 endpoint, __u8 request, if (ret < 0) return ret; - if (ret == size) - return 0; - return -EINVAL; + + return 0; } EXPORT_SYMBOL_GPL(usb_control_msg_send); |