projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6353001
)
USB: usb-skeleton: drop redundant in-urb check
author
Johan Hovold
<johan@kernel.org>
Wed, 9 Oct 2019 17:09:44 +0000
(19:09 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 10 Oct 2019 10:41:19 +0000
(12:41 +0200)
The driver bails out at probe if we can't find a bulk-in endpoint or
if we fail to allocate the URB, so drop the check in read().
Signed-off-by: Johan Hovold <johan@kernel.org>
Link:
https://lore.kernel.org/r/20191009170944.30057-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usb-skeleton.c
patch
|
blob
|
history
diff --git
a/drivers/usb/usb-skeleton.c
b/drivers/usb/usb-skeleton.c
index be311787403eb42cc7fb22edc77d3ab7f92925ab..2dc58766273a721cbedbd54fd28452f7ba1308b0 100644
(file)
--- a/
drivers/usb/usb-skeleton.c
+++ b/
drivers/usb/usb-skeleton.c
@@
-230,8
+230,7
@@
static ssize_t skel_read(struct file *file, char *buffer, size_t count,
dev = file->private_data;
- /* if we cannot read at all, return EOF */
- if (!dev->bulk_in_urb || !count)
+ if (!count)
return 0;
/* no concurrent readers */