backend.c: Return a sigrok error in sr_init() on libusb_init() errors
This commit is contained in:
parent
123d97b177
commit
63c07e48c6
|
@ -244,6 +244,7 @@ SR_API int sr_init(struct sr_context **ctx)
|
||||||
ret = libusb_init(&context->libusb_ctx);
|
ret = libusb_init(&context->libusb_ctx);
|
||||||
if (LIBUSB_SUCCESS != ret) {
|
if (LIBUSB_SUCCESS != ret) {
|
||||||
sr_err("libusb_init() returned %s.\n", libusb_error_name(ret));
|
sr_err("libusb_init() returned %s.\n", libusb_error_name(ret));
|
||||||
|
ret = SR_ERR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue