summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/vfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/vfs.c')
-rw-r--r--extmod/vfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/extmod/vfs.c b/extmod/vfs.c
index 3cb7af1b43..7dca59d351 100644
--- a/extmod/vfs.c
+++ b/extmod/vfs.c
@@ -191,7 +191,8 @@ STATIC mp_obj_t mp_vfs_autodetect(mp_obj_t bdev_obj) {
return mp_fat_vfs_type.make_new(&mp_fat_vfs_type, 1, 0, &bdev_obj);
#endif
- return bdev_obj;
+ // no filesystem found
+ mp_raise_OSError(MP_ENODEV);
}
mp_obj_t mp_vfs_mount(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {