libusbgx: Add error handling to usbg_init() and related functions.
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Fri, 7 Mar 2014 10:44:42 +0000 (11:44 +0100)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 22 Dec 2015 19:35:21 +0000 (20:35 +0100)
commit97c6c58b878c3c5c253e5862691d65135e865679
tree3280c09c355b1bfb80b5153d4917668a7cbf2f10
parent6b58987082e8588889dd43208bf7bcaca4635ae2
libusbgx: Add error handling to usbg_init() and related functions.

Assumption that all malloc() and read()/write() finish correctly
is too bold. Errors should be handled and propagated to upper
layers of library and returned to user.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
[Port from libusbg and update description]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
examples/gadget-acm-ecm.c
examples/show-gadgets.c
include/usbg/usbg.h
src/usbg.c