From e452dd053ec044bceb2933f189ed34bc1278b3aa Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 31 Jan 2022 18:39:29 +0100 Subject: [PATCH] osmo_libusb: Print log message on libusb initialization error Change-Id: I2ac56e378e1279e7e333d93e54cd7a182d76498d --- src/usb/osmo_libusb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/usb/osmo_libusb.c b/src/usb/osmo_libusb.c index 79a8fc3b6..c5ea5079f 100644 --- a/src/usb/osmo_libusb.c +++ b/src/usb/osmo_libusb.c @@ -740,8 +740,10 @@ int osmo_libusb_init(libusb_context **pluctx) int rc; rc = libusb_init(pluctx); - if (rc != 0) + if (rc != 0) { + LOGP(DLUSB, LOGL_ERROR, "Error initializing libusb: %s\n", libusb_strerror(rc)); return rc; + } if (pluctx) luctx = *pluctx;