diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-09-16 08:18:08 +0000 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2009-09-16 08:18:08 +0000 |
commit | 9e72aa51a7a9ac5f041bacab75fd4be1e2a3356c (patch) | |
tree | 375d71717241476bec265568958024db7eee3e37 /sharplhf00l04.c | |
parent | b08ee5c50619d90fd35a1dd06228b952c67dda0b (diff) | |
download | ast2050-flashrom-9e72aa51a7a9ac5f041bacab75fd4be1e2a3356c.zip ast2050-flashrom-9e72aa51a7a9ac5f041bacab75fd4be1e2a3356c.tar.gz |
Fix some of the issues reported by LLVM/clang's scan-build
Corresponding to flashrom svn r722.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
This commit fixes only some of the issues, those that were
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'sharplhf00l04.c')
-rw-r--r-- | sharplhf00l04.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sharplhf00l04.c b/sharplhf00l04.c index 03bb2ce..c4c0f03 100644 --- a/sharplhf00l04.c +++ b/sharplhf00l04.c @@ -73,7 +73,6 @@ int probe_lhf00l04(struct flashchip *flash) uint8_t wait_lhf00l04(chipaddr bios) { uint8_t status; - uint8_t id1, id2; chip_writeb(0x70, bios); if ((chip_readb(bios) & 0x80) == 0) { // it's busy @@ -82,13 +81,13 @@ uint8_t wait_lhf00l04(chipaddr bios) status = chip_readb(bios); - // put another command to get out of status register mode + // put another command to get out of status register mode. chip_writeb(0x90, bios); programmer_delay(10); - id1 = chip_readb(bios); - id2 = chip_readb(bios + 0x01); + chip_readb(bios); // vendor ID + chip_readb(bios + 0x01); // device ID // this is needed to jam it out of "read id" mode chip_writeb(0xAA, bios + 0x5555); |