This is an automated email from Gerrit.

"ahmed BOUDJELIDA <aboudjel...@nanoxplore.com>" just uploaded a new patch set 
to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7990

-- gerrit

commit 69e6b4511af40ffbf9d8874c6798f71195af06ef
Author: Ahmed BOUDJELIDA <aboudjel...@nanoxplore.com>
Date:   Mon Dec 4 10:58:05 2023 +0100

    jtag/drivers: correct the angie_reset function
    
    remove angie_clear_queue function from executing before the
    angie_execute_queued_commands function and making it at the
    end of the reset function.
    
    Change-Id: Id8a0664fbd5b8f9730545ce0f8f272ae0b0e7e78
    Signed-off-by: Ahmed BOUDJELIDA <aboudjel...@nanoxplore.com>

diff --git a/src/jtag/drivers/angie.c b/src/jtag/drivers/angie.c
index 9a60dd7869..bf997009d6 100644
--- a/src/jtag/drivers/angie.c
+++ b/src/jtag/drivers/angie.c
@@ -1713,6 +1713,7 @@ static int angie_reset(int trst, int srst)
 {
        struct angie *device = angie_handle;
        uint8_t low = 0, high = 0;
+       int ret;
 
        if (trst) {
                tap_set_state(TAP_RESET);
@@ -1726,13 +1727,15 @@ static int angie_reset(int trst, int srst)
        else
                high |= SIGNAL_SRST;
 
-       int ret = angie_append_set_signals_cmd(device, low, high);
-       if (ret == ERROR_OK)
-               angie_clear_queue(device);
+       ret = angie_append_set_signals_cmd(device, low, high);
+       if (ret != ERROR_OK)
+               return ret;
 
        ret = angie_execute_queued_commands(device, LIBUSB_TIMEOUT_MS);
-       if (ret == ERROR_OK)
-               angie_clear_queue(device);
+       if (ret != ERROR_OK)
+               return ret;
+
+       angie_clear_queue(device);
 
        return ret;
 }

-- 

Reply via email to