1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #18174 from benpicco/drivers/mtd-early_return

drivers/mtd: return early if init fails
This commit is contained in:
benpicco 2022-06-07 21:54:19 +02:00 committed by GitHub
commit df18bd1127
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,9 @@ int mtd_init(mtd_dev_t *mtd)
if (mtd->driver->init) {
res = mtd->driver->init(mtd);
if (res < 0) {
return res;
}
}
/* Drivers preceding the introduction of write_size need to set it. While