Avoid printing the chip locks if chip detection was forced because lock
access may involve flash chip registers which will not be mapped.

Signed-off-by: Carl-Daniel Hailfinger <[email protected]>

Index: flashrom-no_force_register_access/flashrom.c
===================================================================
--- flashrom-no_force_register_access/flashrom.c        (Revision 1238)
+++ flashrom-no_force_register_access/flashrom.c        (Arbeitskopie)
@@ -1163,8 +1163,12 @@
               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;
 }


-- 
http://www.hailfinger.org/


_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to