aboutsummaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/flashrom.c b/flashrom.c
index e2452c9a..08e3969e 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -340,18 +340,18 @@ static int check_block_eraser(const struct flashctx *flash, int k, int log)
{
struct block_eraser eraser = flash->chip->block_erasers[k];
- if (!eraser.block_erase && !eraser.eraseblocks[0].count) {
+ if (eraser.block_erase == NO_BLOCK_ERASE_FUNC && !eraser.eraseblocks[0].count) {
if (log)
msg_cdbg("not defined. ");
return 1;
}
- if (!eraser.block_erase && eraser.eraseblocks[0].count) {
+ if (eraser.block_erase == NO_BLOCK_ERASE_FUNC && eraser.eraseblocks[0].count) {
if (log)
msg_cdbg("eraseblock layout is known, but matching "
"block erase function is not implemented. ");
return 1;
}
- if (eraser.block_erase && !eraser.eraseblocks[0].count) {
+ if (eraser.block_erase != NO_BLOCK_ERASE_FUNC && !eraser.eraseblocks[0].count) {
if (log)
msg_cdbg("block erase function found, but "
"eraseblock layout is not defined. ");