From 9e72aa51a7a9ac5f041bacab75fd4be1e2a3356c Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Wed, 16 Sep 2009 08:18:08 +0000 Subject: Fix some of the issues reported by LLVM/clang's scan-build Corresponding to flashrom svn r722. Signed-off-by: Stefan Reinauer This commit fixes only some of the issues, those that were Acked-by: Carl-Daniel Hailfinger --- stm50flw0x0x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'stm50flw0x0x.c') diff --git a/stm50flw0x0x.c b/stm50flw0x0x.c index 8cbafe2..44819e5 100644 --- a/stm50flw0x0x.c +++ b/stm50flw0x0x.c @@ -54,19 +54,17 @@ int probe_stm50flw0x0x(struct flashchip *flash) static void wait_stm50flw0x0x(chipaddr bios) { - uint8_t id1; - // id2; - chip_writeb(0x70, bios); if ((chip_readb(bios) & 0x80) == 0) { // it's busy while ((chip_readb(bios) & 0x80) == 0) ; } + // put another command to get out of status register mode chip_writeb(0x90, bios); programmer_delay(10); - id1 = chip_readb(bios); + chip_readb(bios); // Read device ID (to make sure?) // this is needed to jam it out of "read id" mode chip_writeb(0xAA, bios + 0x5555); -- cgit v1.1