[Git Patch]fs/jffs2/acl.c: Fix a may-be-uninitialized return value

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Adrian Bunk <bunk@...>
Cc: KaiGai Kohei <kaigai@...>, David Woodhouse <dwmw2@...>, <jffs-dev@...>, <linux-kernel@...>
Date: Saturday, October 27, 2007 - 10:47 am

Fix a may-be-uninitialized return value.

Found-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---
 fs/jffs2/acl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index 9728614..5b14062 100644
--- a/fs/jffs2/acl.c
+++ b/fs/jffs2/acl.c
@@ -358,7 +358,7 @@ int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, int *i_mode)
 int jffs2_init_acl_post(struct inode *inode)
 {
 	struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
-	int rc;
+	int rc = 0;
 
 	if (f->i_acl_default) {
 		rc = __jffs2_set_acl(inode, JFFS2_XPREFIX_ACL_DEFAULT, f->i_acl_default);

-- 
May the Source Be With You.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
jffs2_init_acl_post() can return uninitialized variable, Adrian Bunk, (Sat Oct 27, 10:18 am)
[Git Patch]fs/jffs2/acl.c: Fix a may-be-uninitialized return..., WANG Cong, (Sat Oct 27, 10:47 am)
Re: jffs2_init_acl_post() can return uninitialized variable, David Woodhouse, (Sat Oct 27, 10:42 am)