OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf5fbe0
)
USB: core: drop short-transfer check from usb_control_msg_send()
author
Johan Hovold
<johan@kernel.org>
Fri, 4 Dec 2020 08:51:09 +0000
(09:51 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 4 Dec 2020 15:48:42 +0000
(16:48 +0100)
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>
drivers/usb/core/message.c
patch
|
blob
|
history
diff --git
a/drivers/usb/core/message.c
b/drivers/usb/core/message.c
index
c4e8760
..
0d8f75e
100644
(file)
--- 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);