This is an automated email from Gerrit.

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

-- gerrit

commit eb57781aebaf5d933a128f261047b2c32f74db2c
Author: Yuriy Vynnychek <[email protected]>
Date:   Wed Mar 15 12:49:29 2017 +0200

    Added support for new PSoC 6 device.
    
    Change-Id: I65b5b9e45dfbdc79110fcb8186d09efb6ad5e405
    Signed-off-by: Yuriy Vynnychek <[email protected]>

diff --git a/src/flash/nor/psoc6.c b/src/flash/nor/psoc6.c
index 927596e..86a4225 100755
--- a/src/flash/nor/psoc6.c
+++ b/src/flash/nor/psoc6.c
@@ -782,7 +782,6 @@ static int psoc6_mass_erase(struct flash_bank *bank)
 
*******************************************************************************/
 static int Psoc6Erase(struct flash_bank *bank, int first, int last)
 {
-       int hr;
        struct target *target = bank->target;
        struct psoc6FlashBank *psoc6Info = bank->driver_priv;
 
@@ -791,12 +790,11 @@ static int Psoc6Erase(struct flash_bank *bank, int first, 
int last)
        LOG_DEBUG("first-> 0x%x, last-> 0x%x", first, last - 1);
 
        if ((unsigned)(last - 1) != 
(psoc6Info->flashSizeInKb/FLASH_SECTOR_LENGTH)) {
-               hr = ERROR_OK;
                LOG_INFO("Count of sector is more then real present");
        } else
-               hr = EraseSector(target, first, last - 1);
+               return EraseSector(target, first, last - 1);
 
-       return hr;
+       return ERROR_OK;
 }
 
 

-- 

------------------------------------------------------------------------------
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