]> sigrok.org Git - libsigrok.git/commitdiff
fx2lafw: Don't say "Device came back" when it didn't
authorJoel Holdsworth <redacted>
Thu, 6 Dec 2012 21:31:37 +0000 (21:31 +0000)
committerBert Vermeulen <redacted>
Thu, 6 Dec 2012 21:40:00 +0000 (22:40 +0100)
hardware/fx2lafw/fx2lafw.c

index 648b13f48cb0361712a59b8bf032f778b1503280..fb8bae8fb263cccf494f2323b465f20faa8aa692 100644 (file)
@@ -542,7 +542,6 @@ static int hw_dev_open(struct sr_dev_inst *sdi)
                        timediff_ms = timediff_us / 1000;
                        sr_spew("fx2lafw: waited %" PRIi64 " ms", timediff_ms);
                }
-               sr_info("fx2lafw: Device came back after %d ms.", timediff_ms);
        } else {
                ret = fx2lafw_dev_open(sdi);
        }
@@ -550,7 +549,11 @@ static int hw_dev_open(struct sr_dev_inst *sdi)
        if (ret != SR_OK) {
                sr_err("fx2lafw: Unable to open device.");
                return SR_ERR;
+       } else {
+               sr_info("fx2lafw: Device came back after %d ms.",
+                       timediff_ms);
        }
+
        devc = sdi->priv;
 
        ret = libusb_claim_interface(devc->usb->devhdl, USB_INTERFACE);