1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 23:22:37 +02:00

Kill one superfluous variable and improve code readability

Corresponding to flashrom svn r489.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
Carl-Daniel Hailfinger 2009-05-09 07:32:30 +00:00
parent 97d6b09209
commit 8b4f8e0453

View File

@ -82,7 +82,6 @@ int read_memmapped(struct flashchip *flash, uint8_t *buf)
struct flashchip *probe_flash(struct flashchip *first_flash, int force)
{
volatile uint8_t *bios;
struct flashchip *flash;
unsigned long base = 0, size;
@ -114,7 +113,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force)
}
base = flashbase ? flashbase : (0xffffffff - size + 1);
flash->virtual_memory = bios = physmap("flash chip", base, size);
flash->virtual_memory = physmap("flash chip", base, size);
if (force)
break;
@ -127,7 +126,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force)
break;
notfound:
physunmap((void *)bios, size);
physunmap((void *)flash->virtual_memory, size);
}
if (!flash || !flash->name)