diff --git a/subsys/fs/ext2/ext2_impl.c b/subsys/fs/ext2/ext2_impl.c index a0b49415ec9a..812378ca675d 100644 --- a/subsys/fs/ext2/ext2_impl.c +++ b/subsys/fs/ext2/ext2_impl.c @@ -203,13 +203,13 @@ int ext2_init_storage(struct ext2_data **fsp, const void *storage_dev, int flags dev_size = fs->backend_ops->get_device_size(fs); if (dev_size < 0) { - ret = dev_size; + ret = (int)dev_size; goto err; } write_size = fs->backend_ops->get_write_size(fs); if (write_size < 0) { - ret = write_size; + ret = (int)write_size; goto err; }