1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-28 15:33:42 +02:00

Avoid printing the chip locks if chip detection was forced

Lock access may involve flash chip registers which will not be mapped
if automatic detection failed.

Corresponding to flashrom svn r1240.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
This commit is contained in:
Carl-Daniel Hailfinger 2010-12-02 21:59:42 +00:00
parent 742999c682
commit 859f3f0d75

View File

@ -1163,8 +1163,12 @@ notfound:
flash->vendor, flash->name, flash->total_size,
flashbuses_to_text(flash->bustype), base);
if (flash->printlock)
flash->printlock(flash);
/* Flash registers will not be mapped if the chip was forced. Lock info
* may be stored in registers, so avoid lock info printing.
*/
if (!force)
if (flash->printlock)
flash->printlock(flash);
return flash;
}