aboutsummaryrefslogtreecommitdiffstats
path: root/dummyflasher.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-10-17 15:20:27 +0200
committerEdward O'Callaghan <quasisec@chromium.org>2020-10-27 11:34:12 +0000
commitc8df4014b7e7cc02407dde557a45b1448f44b424 (patch)
treee288be787b7bf770f24bd801c0ee7429ec54e6eb /dummyflasher.c
parentda0825f05f0d8d1af2e12ab3ccf950051a3eb608 (diff)
downloadflashrom-c8df4014b7e7cc02407dde557a45b1448f44b424.tar.gz
flashrom-c8df4014b7e7cc02407dde557a45b1448f44b424.tar.bz2
flashrom-c8df4014b7e7cc02407dde557a45b1448f44b424.zip
dummyflasher.c: Do not print an error if probing fails
This line gets printed even when not using dummyflasher at all. Drop it. TEST=Check that no spurious error message appears with ft2232_spi. Change-Id: I1a81a735db391357d1b6ee6f3e9844255efd0e19 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/46524 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'dummyflasher.c')
-rw-r--r--dummyflasher.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/dummyflasher.c b/dummyflasher.c
index 6426ad2e..32a00abb 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -1029,13 +1029,9 @@ int probe_variable_size(struct flashctx *flash)
{
unsigned int i;
const struct emu_data *emu_data = get_data_from_context(flash);
- if (!emu_data) {
- msg_perr("No data in flash context!\n");
- return 0;
- }
/* Skip the probing if we don't emulate this chip. */
- if (emu_data->emu_chip != EMULATE_VARIABLE_SIZE)
+ if (!emu_data || emu_data->emu_chip != EMULATE_VARIABLE_SIZE)
return 0;
/*