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>
This commit is contained in:
Johan Hovold 2020-12-04 09:51:09 +01:00 committed by Greg Kroah-Hartman
parent cf5fbe0204
commit baf7df456b
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}
EXPORT_SYMBOL_GPL(usb_control_msg_send);