Skip to content

Commit 8473928

Browse files
butokkartben
authored andcommitted
zms: fix the zms_mount() sector_size check
Adds the return -EINVAL, if the fix zms_mount() sector_size check is failed. Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
1 parent b132558 commit 8473928

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

subsys/fs/zms/zms.c

+1
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,7 @@ int zms_mount(struct zms_fs *fs)
13651365
if (fs->sector_size < ZMS_MIN_ATE_NUM * fs->ate_size) {
13661366
LOG_ERR("Invalid sector size, should be at least %zu",
13671367
ZMS_MIN_ATE_NUM * fs->ate_size);
1368+
return -EINVAL;
13681369
}
13691370

13701371
/* check the number of sectors, it should be at least 2 */

0 commit comments

Comments
 (0)