aboutsummaryrefslogtreecommitdiffstats
path: root/features/yaffs2/fs-yaffs2-fix-the-wrong-check-of-return-value-of-dir.patch
blob: ce18b23d4a70c84cc217336ca10bd992c4b24c0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From d1abef02a9577d2df4be397dfa856d3fb46f94c6 Mon Sep 17 00:00:00 2001
From: Kevin Hao <kexin.hao@windriver.com>
Date: Tue, 20 Sep 2016 19:54:44 +0800
Subject: [PATCH 5/5] fs: yaffs2: fix the wrong check of return value of
 dir_emit()

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@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@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.5.0