This is an automated email from Gerrit.

"zapb <d...@zapb.de>" just uploaded a new patch set to Gerrit, which you can 
find at https://review.openocd.org/c/openocd/+/8995

-- gerrit

commit c07fdaa87e55dc7e30e350447820a843baafa58f
Author: Marc Schink <d...@zapb.de>
Date:   Fri Jul 11 14:39:45 2025 +0200

    rtt: Fix check for available down-channels
    
    The number of up-channels is erroneously checked instead of the number
    of down-channels.
    
    Change-Id: Iff5348387b3466ed66f34df81e1039918608ac77
    Signed-off-by: Marc Schink <d...@zapb.de>

diff --git a/src/rtt/rtt.c b/src/rtt/rtt.c
index 15b9a373a5..3c7a966a79 100644
--- a/src/rtt/rtt.c
+++ b/src/rtt/rtt.c
@@ -288,7 +288,7 @@ int rtt_set_polling_interval(unsigned int interval)
 int rtt_write_channel(unsigned int channel_index, const uint8_t *buffer,
                size_t *length)
 {
-       if (channel_index >= rtt.ctrl.num_up_channels) {
+       if (channel_index >= rtt.ctrl.num_down_channels) {
                LOG_WARNING("rtt: Down-channel %u is not available", 
channel_index);
                return ERROR_OK;
        }

-- 

Reply via email to