public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: WANG Cong <xiyou.wangcong@gmail.com>
To: Adrian Bunk <bunk@kernel.org>
Cc: KaiGai Kohei <kaigai@ak.jp.nec.com>,
	David Woodhouse <dwmw2@infradead.org>,
	jffs-dev@axis.com, linux-kernel@vger.kernel.org
Subject: [Git Patch]fs/jffs2/acl.c: Fix a may-be-uninitialized return value
Date: Sat, 27 Oct 2007 22:47:45 +0800	[thread overview]
Message-ID: <20071027144745.GF2506@hacking> (raw)
In-Reply-To: <20071027141842.GV30533@stusta.de>


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.

      parent reply	other threads:[~2007-10-27 14:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-27 14:18 jffs2_init_acl_post() can return uninitialized variable Adrian Bunk
2007-10-27 14:42 ` David Woodhouse
2007-10-27 14:47 ` WANG Cong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071027144745.GF2506@hacking \
    --to=xiyou.wangcong@gmail.com \
    --cc=bunk@kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=jffs-dev@axis.com \
    --cc=kaigai@ak.jp.nec.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox