This is an automated email from Gerrit.

Tomas Vanek ([email protected]) just uploaded a new patch set to Gerrit, which you 
can find at http://openocd.zylin.com/4391

-- gerrit

commit eb34f1881f1a2c271b7b5f1ecf7cb40e9ce3f5c3
Author: Tomas Vanek <[email protected]>
Date:   Sun Jan 21 10:47:32 2018 +0100

    flash/nor/kinetis_ke: fix warning retval set but not used
    
    I see no reason for not returning error from target_run_algorithm()
    to higher level.
    
    Reported by Clang static analyzer.
    
    Change-Id: Iaaa8b66e487ecae88c0cf4ae2addba63341c032c
    Signed-off-by: Tomas Vanek <[email protected]>

diff --git a/src/flash/nor/kinetis_ke.c b/src/flash/nor/kinetis_ke.c
index 636fcc2..b7a6a1e 100644
--- a/src/flash/nor/kinetis_ke.c
+++ b/src/flash/nor/kinetis_ke.c
@@ -478,14 +478,13 @@ int kinetis_ke_stop_watchdog(struct target *target)
                        watchdog_algorithm->address, 0, 100000, &armv7m_info);
        if (retval != ERROR_OK) {
                LOG_ERROR("Error executing Kinetis KE watchdog algorithm");
-               retval = ERROR_FAIL;
        } else {
                LOG_INFO("Watchdog stopped");
        }
 
        target_free_working_area(target, watchdog_algorithm);
 
-       return ERROR_OK;
+       return retval;
 }
 
 COMMAND_HANDLER(kinetis_ke_disable_wdog_handler)

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to