diff --git a/fs/procfs/fs_procfs.c b/fs/procfs/fs_procfs.c index 0c69f8addb..f9e5aa06dd 100644 --- a/fs/procfs/fs_procfs.c +++ b/fs/procfs/fs_procfs.c @@ -664,6 +664,11 @@ static int procfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, break; } } + + if (x == g_procfs_entrycount) + { + return -ENOENT; + } } dir->u.procfs = priv;