aboutsummaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/flashrom.c b/flashrom.c
index c5b795c1..b135e580 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1179,9 +1179,11 @@ notfound:
/* Flash registers may more likely not be mapped if the chip was forced.
* Lock info may be stored in registers, so avoid lock info printing. */
- if (!force)
- if (flash->chip->printlock)
- flash->chip->printlock(flash);
+ if (!force) {
+ printlockfunc_t *printlock = lookup_printlock_func_ptr(flash);
+ if (printlock)
+ printlock(flash);
+ }
/* Get out of the way for later runs. */
unmap_flash(flash);