From: Chen Hanxiao <chenhanx...@gmail.com>

If we don't open a USB device successfully,
don't try to show device info logs.

Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com>
---
 usbredirserver/usbredirserver.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/usbredirserver/usbredirserver.c b/usbredirserver/usbredirserver.c
index 131ed5e..5a4adc5 100644
--- a/usbredirserver/usbredirserver.c
+++ b/usbredirserver/usbredirserver.c
@@ -366,8 +366,7 @@ int main(int argc, char *argv[])
                 fprintf(stderr,
                     "Could not open an usb-device with vid:pid %04x:%04x\n",
                     usbvendor, usbproduct);
-            }
-            if (verbose >= usbredirparser_info) {
+            } else if (verbose >= usbredirparser_info) {
                 libusb_device *dev;
                 dev = libusb_get_device(handle);
                 fprintf(stderr, "Open a usb-device with vid:pid %04x:%04x on "
-- 
2.14.3

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to