drivers/stlink_usb: check error code returned by st-link 25/4825/4
authorAntonio Borneo <borneo.antonio@gmail.com>
Fri, 7 Dec 2018 11:37:20 +0000 (12:37 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Fri, 8 Mar 2019 06:41:37 +0000 (06:41 +0000)
commit05c6c871e3328dd38dc46ea11b3b9b546feb7850
tree4284d8f486b9602eee9af0fc3e461919f88bf430
parentd46b28983dc27369e90f4dc8a0e54b5057583b38
drivers/stlink_usb: check error code returned by st-link

Most of ST-Link commands return an error code, but this is almost
never checked.

Check for the error code for every command that returns it.

Change-Id: Ifc4e32f8c73196de23700ba0989bfdfe0f5b46e3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4825
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/jtag/drivers/stlink_usb.c