summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2022-10-10 15:30:46 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2022-10-16 11:39:44 +0000
commit890d07986b66aed4d216a02977d37bfb69cec034 (patch)
treebe76bfe183a3fe8357ad35c247a27aa911a9a63c
parent001c87d9014b5b2dbb8adc9f64ab7023359a38b4 (diff)
downloadflashrom-890d07986b66aed4d216a02977d37bfb69cec034.tar.gz
flashrom-890d07986b66aed4d216a02977d37bfb69cec034.tar.bz2
flashrom-890d07986b66aed4d216a02977d37bfb69cec034.zip
flashrom.c: Use programmer_init() func params over global
The 'programmer' intended to be used in the control flow of 'programmer_init()' is a parameter to the function. Therefore use that symbol directly over the global copy of it. Change-Id: I71e61f0633bac2fc472971249910bf3bf57cd0eb Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/68249 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--flashrom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/flashrom.c b/flashrom.c
index 357582286..6dae5e38c 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -161,8 +161,8 @@ int programmer_init(const struct programmer_entry *prog, const char *param)
cfg.params = NULL;
}
- msg_pdbg("Initializing %s programmer\n", programmer->name);
- ret = programmer->init(&cfg);
+ msg_pdbg("Initializing %s programmer\n", prog->name);
+ ret = prog->init(&cfg);
if (cfg.params && strlen(cfg.params)) {
if (ret != 0) {
/* It is quite possible that any unhandled programmer parameter would have been valid,