Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: usb-skeleton: drop redundant in-urb check

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>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
369dca42 63530018

+1 -2
+1 -2
drivers/usb/usb-skeleton.c
··· 230 230 231 231 dev = file->private_data; 232 232 233 - /* if we cannot read at all, return EOF */ 234 - if (!dev->bulk_in_urb || !count) 233 + if (!count) 235 234 return 0; 236 235 237 236 /* no concurrent readers */