[poky] [kernel 5/6] fs: yaffs2: fix the wrong check of return value of dir_emit()

Kevin Hao kexin.hao at windriver.com
Tue Sep 20 04:54:44 PDT 2016


Fix the following build warning:
fs/yaffs2/yaffs_vfs.c:1788:34: warning: comparison of constant '0' with boolean expression is always false [-Wbool-compare]
           this_inode, this_type) < 0) {

Signed-off-by: Kevin Hao <kexin.hao at windriver.com>
---
 fs/yaffs2/yaffs_vfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/yaffs2/yaffs_vfs.c b/fs/yaffs2/yaffs_vfs.c
index f3efeb0ad4e0..5a9c295aecc8 100644
--- a/fs/yaffs2/yaffs_vfs.c
+++ b/fs/yaffs2/yaffs_vfs.c
@@ -1785,7 +1785,7 @@ static int yaffs_readdir(struct file *file, struct dir_context *ctx)
 			yaffs_gross_unlock(dev);
 
 			if (!dir_emit(ctx, name, strlen(name),
-				      this_inode, this_type) < 0) {
+				      this_inode, this_type)) {
 				yaffs_gross_lock(dev);
 				goto out;
 			}
-- 
2.9.3



More information about the poky mailing list