libusbgx: Add error handling to gadget_read_string().
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Mon, 16 Dec 2013 09:45:18 +0000 (10:45 +0100)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 22 Dec 2015 19:33:56 +0000 (20:33 +0100)
commit46f3bd29d7a1a19017a3961da742f508a977f8cb
treea410cef96db653791ed502ff476bf90f2d4ac0d5
parent41c958208ec6922df4fd7e94dc597b7757d28ed0
libusbgx: Add error handling to gadget_read_string().

Add error handling when gadget_read_buf() returns NULL.
If read of string fails, the string should be set as empty.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
[Port from libusbg and update description]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
src/usbg.c