summaryrefslogtreecommitdiff
path: root/usb-linux.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-05-31 11:35:20 +0200
committerGerd Hoffmann <kraxel@redhat.com>2011-06-14 12:56:49 +0200
commit9de9f0d61b06a094f625c567ed0ef38e40d70cf5 (patch)
tree5d2e0b260fe150cedbc5cd1e761b39837eb6f7fc /usb-linux.c
parentcdc5143e803d819150f785081abe9d16fa6933c8 (diff)
downloadqemu-9de9f0d61b06a094f625c567ed0ef38e40d70cf5.tar.gz
qemu-9de9f0d61b06a094f625c567ed0ef38e40d70cf5.tar.bz2
qemu-9de9f0d61b06a094f625c567ed0ef38e40d70cf5.zip
usb-linux: Don't do perror when errno is not set
Note that "op" also is not set, so before this change these error paths would feed NULL to perror. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'usb-linux.c')
-rw-r--r--usb-linux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usb-linux.c b/usb-linux.c
index ed1d56add7..feb4d36d0b 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -376,7 +376,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;
@@ -404,7 +405,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];