mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
mtd: fix return in mtd_erase()
If `.erase` is implemented we must return, not execute the fallback code path fixes #14988
This commit is contained in:
parent
21fbf62e4e
commit
90751bcec1
@ -183,7 +183,7 @@ int mtd_erase(mtd_dev_t *mtd, uint32_t addr, uint32_t count)
|
||||
}
|
||||
|
||||
if (mtd->driver->erase) {
|
||||
mtd->driver->erase(mtd, addr, count);
|
||||
return mtd->driver->erase(mtd, addr, count);
|
||||
}
|
||||
|
||||
uint32_t sector_size = mtd->pages_per_sector * mtd->page_size;
|
||||
|
Loading…
Reference in New Issue
Block a user