From: Hans de Goede <hdego...@redhat.com> Note that "op" also is not set, so before this change these error paths would feed NULL to perror.
Signed-off-by: Gerd Hoffmann <kra...@redhat.com> --- usb-linux.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/usb-linux.c b/usb-linux.c index 03e43c0..4c6c284 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -377,7 +377,8 @@ static int usb_host_claim_interfaces(USBHostDevice *dev, int configuration) i = 0; dev_descr_len = dev->descr[0]; if (dev_descr_len > dev->descr_len) { - goto fail; + fprintf(stderr, "husb: update iface failed. descr too short\n"); + return 0; } i += dev_descr_len; @@ -405,7 +406,7 @@ static int usb_host_claim_interfaces(USBHostDevice *dev, int configuration) if (i >= dev->descr_len) { fprintf(stderr, "husb: update iface failed. no matching configuration\n"); - goto fail; + return 0; } nb_interfaces = dev->descr[i + 4]; -- 1.7.1