From 269b33098994a56fc12f6b64b2007c68c9e405d7 Mon Sep 17 00:00:00 2001 From: Far Date: Wed, 20 Oct 2021 11:09:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=B3=BB=E7=BB=9Fvfs=E5=B1=82=E6=9C=AA=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E5=88=A4=E7=A9=BAg=5Ffs=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Close #I4ELJN Signed-off-by: Far --- components/fs/fs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/fs/fs.c b/components/fs/fs.c index a06212a3..636667f9 100644 --- a/components/fs/fs.c +++ b/components/fs/fs.c @@ -347,14 +347,14 @@ ssize_t read(int fd, void *buf, size_t nbyte) return recv(fd, buf, nbyte, 0); } #endif - if (g_fs->fsFops == NULL || g_fs->fsFops->Read == NULL) { - errno = ENOSYS; - return FS_FAILURE; - } if (g_fs == NULL) { errno = ENODEV; return FS_FAILURE; } + if (g_fs->fsFops == NULL || g_fs->fsFops->Read == NULL) { + errno = ENOSYS; + return FS_FAILURE; + } return g_fs->fsFops->Read(fd, buf, nbyte); }