From 9232da4af89275ddc5d7a22a5e4127f630816aa9 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 2 Oct 2017 11:46:08 -0600 Subject: [PATCH] fs/vfs: Remove warning generated by fcntl() --- fs/vfs/fs_fcntl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/vfs/fs_fcntl.c b/fs/vfs/fs_fcntl.c index d9616a7d52..e1bf25bf1f 100644 --- a/fs/vfs/fs_fcntl.c +++ b/fs/vfs/fs_fcntl.c @@ -77,7 +77,7 @@ #if CONFIG_NFILE_DESCRIPTORS > 0 int file_vfcntl(FAR struct file *filep, int cmd, va_list ap) { - int ret; + int ret = -EINVAL; /* Was this file opened ? */ @@ -205,7 +205,6 @@ int file_vfcntl(FAR struct file *filep, int cmd, va_list ap) break; default: - ret = -EINVAL; break; }