diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2018-07-05 11:46:44 +0200 |
---|---|---|
committer | Matthias Welwarsky <matthias@welwarsky.de> | 2018-09-07 08:18:53 +0100 |
commit | d1b74376336814266236054f925a9964b87dd8a5 (patch) | |
tree | 8180dd0c1d3d4b476560d53a7f3aa8a748ccfecf | |
parent | ab858febb6ca6e5dada1492e96c00d8b12c575c0 (diff) | |
download | riscv-openocd-d1b74376336814266236054f925a9964b87dd8a5.zip riscv-openocd-d1b74376336814266236054f925a9964b87dd8a5.tar.gz riscv-openocd-d1b74376336814266236054f925a9964b87dd8a5.tar.bz2 |
libusb: return oocd error values
keep same return style where possible
Change-Id: I2f9b85dbc307a483609f76a84de77e3c74d346c7
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-on: http://openocd.zylin.com/4588
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
-rw-r--r-- | src/jtag/drivers/libusb1_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jtag/drivers/libusb1_common.c b/src/jtag/drivers/libusb1_common.c index 89f8092..a1db86f 100644 --- a/src/jtag/drivers/libusb1_common.c +++ b/src/jtag/drivers/libusb1_common.c @@ -71,11 +71,11 @@ int jtag_libusb_open(const uint16_t vids[], const uint16_t pids[], struct jtag_libusb_device_handle **out) { int cnt, idx, errCode; - int retval = -ENODEV; + int retval = ERROR_FAIL; struct jtag_libusb_device_handle *libusb_handle = NULL; if (libusb_init(&jtag_libusb_context) < 0) - return -ENODEV; + return ERROR_FAIL; cnt = libusb_get_device_list(jtag_libusb_context, &devs); @@ -105,7 +105,7 @@ int jtag_libusb_open(const uint16_t vids[], const uint16_t pids[], /* Success. */ *out = libusb_handle; - retval = 0; + retval = ERROR_OK; break; } if (cnt >= 0) |