summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/spi/spi_flash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index cc21ccb20e..b0b58993a6 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -448,7 +448,7 @@ int spi_flash_is_write_protected(const struct spi_flash *flash,
if (!flash->ops->get_write_protection) {
printk(BIOS_WARNING, "SPI: Write-protection gathering not "
"implemented for this vendor.\n");
- return 0;
+ return -1;
}
return flash->ops->get_write_protection(flash, region);
@@ -473,7 +473,7 @@ int spi_flash_set_write_protected(const struct spi_flash *flash,
if (!flash->ops->set_write_protection) {
printk(BIOS_WARNING, "SPI: Setting write-protection is not "
"implemented for this vendor.\n");
- return 0;
+ return -1;
}
ret = flash->ops->set_write_protection(flash, region, non_volatile,