mirror of
https://github.com/linux-msm/openocd.git
synced 2026-02-25 13:15:07 -08:00
target/esp32s2: check xtensa_poll return value
Although scan build couldn't catch, return value overwritten without checking. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I02b10002b03640604315047e8a8a639824724c16 Reviewed-on: https://review.openocd.org/c/openocd/+/7247 Tested-by: jenkins Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
45c9e1e8c0
commit
2d5d8a5a62
@@ -402,6 +402,8 @@ static int esp32s2_poll(struct target *target)
|
||||
{
|
||||
enum target_state old_state = target->state;
|
||||
int ret = esp_xtensa_poll(target);
|
||||
if (ret != ERROR_OK)
|
||||
return ret;
|
||||
|
||||
if (old_state != TARGET_HALTED && target->state == TARGET_HALTED) {
|
||||
/* Call any event callbacks that are applicable */
|
||||
|
||||
Reference in New Issue
Block a user