From: Johan Hovold Date: Wed, 9 Oct 2019 17:09:44 +0000 (+0200) Subject: USB: usb-skeleton: drop redundant in-urb check X-Git-Tag: v5.4-rc3~8^2~14 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=369dca424a3f9ef80bc4e5a5ccdd41a17ce306c1;p=linux-block.git 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 Link: https://lore.kernel.org/r/20191009170944.30057-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c index be311787403e..2dc58766273a 100644 --- 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 */