From: Peter Stuge Date: Sat, 3 Nov 2012 07:29:26 +0000 (+0100) Subject: backend.c: Return a sigrok error in sr_init() on libusb_init() errors X-Git-Tag: dsupstream~472 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=63c07e48c627684f04d70e7dea2baf7c72ff2a41;p=libsigrok.git backend.c: Return a sigrok error in sr_init() on libusb_init() errors --- diff --git a/backend.c b/backend.c index f596c96e..9c279694 100644 --- a/backend.c +++ b/backend.c @@ -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