cfi_flash: Fix else after break
authorMario Six <mario.six@gdsys.cc>
Fri, 26 Jan 2018 13:43:45 +0000 (14:43 +0100)
committerStefan Roese <sr@denx.de>
Mon, 29 Jan 2018 06:48:58 +0000 (07:48 +0100)
If in a loop, the if block in a if/else statement ends in a break, the
statements in the else blockcan be extracted, since the break stops the
execution.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
drivers/mtd/cfi_flash.c

index 4c5e1568e6e79bfb13543d93af62647948a51ceb..5b3c071b30e2236b1ccb7643df67ecec0d29495b 100644 (file)
@@ -1826,9 +1826,9 @@ static int flash_detect_legacy(phys_addr_t base, int banknum)
                                                info->device_id2);
                                if (jedec_flash_match(info, info->start[0]))
                                        break;
-                               else
-                                       unmap_physmem((void *)info->start[0],
-                                                     info->portwidth);
+
+                               unmap_physmem((void *)info->start[0],
+                                             info->portwidth);
                        }
                }