From: Mario Six Date: Fri, 26 Jan 2018 13:43:45 +0000 (+0100) Subject: cfi_flash: Fix else after break X-Git-Tag: v2018.03-rc1~10^2~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9860137fbcbacfb91069194f9635af0ed8288456;p=u-boot cfi_flash: Fix else after break 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 Signed-off-by: Stefan Roese --- diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 4c5e1568e6..5b3c071b30 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -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); } }