summaryrefslogtreecommitdiffstats
path: root/libflash
diff options
context:
space:
mode:
Diffstat (limited to 'libflash')
-rw-r--r--libflash/blocklevel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libflash/blocklevel.c b/libflash/blocklevel.c
index f3fad69e..172f8fcc 100644
--- a/libflash/blocklevel.c
+++ b/libflash/blocklevel.c
@@ -263,6 +263,7 @@ int blocklevel_write(struct blocklevel_device *bl, uint64_t pos, const void *buf
if (rc) {
errno = EBADF;
rc = FLASH_ERR_ECC_INVALID;
+ goto out;
}
/*
@@ -274,6 +275,7 @@ int blocklevel_write(struct blocklevel_device *bl, uint64_t pos, const void *buf
if (rc) {
errno = EBADF;
rc = FLASH_ERR_ECC_INVALID;
+ goto out;
}
if (memcpy_to_ecc_unaligned(buffer, buf, len, ecc_diff)) {
OpenPOWER on IntegriCloud