stlink_target_voltage: Check for libusb error
authorMaxime Coquelin <mcoquelin.stm32@gmail.com>
Thu, 10 Mar 2016 15:39:26 +0000 (16:39 +0100)
committerMaxime Coquelin <mcoquelin.stm32@gmail.com>
Mon, 14 Mar 2016 14:12:44 +0000 (15:12 +0100)
_stlink_usb_target_voltage already returns an error value.
If value return is positive, this is a voltage, if negative this is an error.
Check the return on callers side to inform there is an error in reading the
voltage, instead of notifying of a too low voltage.

Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>

No differences found