backend.c: Return a sigrok error in sr_init() on libusb_init() errors

This commit is contained in:
Peter Stuge 2012-11-03 08:29:26 +01:00
parent 123d97b177
commit 63c07e48c6
1 changed files with 1 additions and 0 deletions

View File

@ -244,6 +244,7 @@ SR_API int sr_init(struct sr_context **ctx)
ret = libusb_init(&context->libusb_ctx);
if (LIBUSB_SUCCESS != ret) {
sr_err("libusb_init() returned %s.\n", libusb_error_name(ret));
ret = SR_ERR;
goto done;
}
#endif