usbip: tools: Fix read_usb_vudc_device() error path handling
authorGwanYeong Kim <gy741.kim@gmail.com>
Fri, 18 Oct 2019 03:22:23 +0000 (03:22 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Oct 2019 16:51:06 +0000 (17:51 +0100)
commit28df0642abbf6d66908a2858922a7e4b21cdd8c2
tree9450394f19c6b8fc419469baeea8f241682121c5
parentd5501d5c29a2e684640507cfee428178d6fd82ca
usbip: tools: Fix read_usb_vudc_device() error path handling

This isn't really accurate right. fread() doesn't always
return 0 in error. It could return < number of elements
and set errno.

Signed-off-by: GwanYeong Kim <gy741.kim@gmail.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20191018032223.4644-1-gy741.kim@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/usb/usbip/libsrc/usbip_device_driver.c