]> git.sur5r.net Git - openocd/commitdiff
str71x: fix previous commit
authorSpencer Oliver <ntfreak@users.sourceforge.net>
Tue, 4 May 2010 14:51:43 +0000 (15:51 +0100)
committerSpencer Oliver <ntfreak@users.sourceforge.net>
Tue, 4 May 2010 14:51:43 +0000 (15:51 +0100)
fix build issue with 70226c221f5879bb6126ff3f2ec9ae64c68d80d6 commit

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
src/flash/nor/str7x.c

index 556dec260598603226a54943c4ec4e13e06ee0bb..adabad7db0c3c3705072994d2327f950ad049dd3 100644 (file)
@@ -498,9 +498,6 @@ static int str7x_write(struct flash_bank *bank, uint8_t *buffer,
                                /* if block write failed (no sufficient working area),
                                 * we use normal (slow) single dword accesses */
                                LOG_WARNING("couldn't use block writes, falling back to single memory accesses");
-                       } else
-                       {
-                               return retval;
                        }
                        else if (retval == ERROR_FLASH_OPERATION_FAILED)
                        {
@@ -510,6 +507,10 @@ static int str7x_write(struct flash_bank *bank, uint8_t *buffer,
                                LOG_ERROR("flash writing failed with error code: 0x%x", retval);
                                return ERROR_FLASH_OPERATION_FAILED;
                        }
+                       else
+                       {
+                               return retval;
+                       }
                }
                else
                {