Skip to content

Commit

Permalink
[components][dfs_v1] fix bug error return add 'disk[index] = RT_NULL'
Browse files Browse the repository at this point in the history
  • Loading branch information
youzuwei committed Dec 31, 2024
1 parent 8cf5389 commit 07e0c5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ int dfs_elm_mount(struct dfs_filesystem *fs, unsigned long rwflag, const void *d
{
if (geometry.bytes_per_sector > FF_MAX_SS)
{
disk[index] = RT_NULL;
rt_kprintf("The sector size of device is greater than the sector size of FAT.\n");
return -EINVAL;
}
Expand Down

0 comments on commit 07e0c5d

Please sign in to comment.