From patchwork Mon Jun 25 15:19:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: ubifs: Fix build warning Date: Mon, 25 Jun 2012 05:19:40 -0000 From: Alexandre Pereira da Silva X-Patchwork-Id: 167138 Message-Id: <1340637580-12711-1-git-send-email-aletes.xgr@gmail.com> To: Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Adrian Hunter , Alexandre Pereira da Silva , Artem Bityutskiy Fix: fs/ubifs/dir.c: In function 'ubifs_rename': fs/ubifs/dir.c:972:15: warning: 'saved_nlink' may be used uninitialized in this function Initilize saved_nlink to 0 Signed-off-by: Alexandre Pereira da Silva --- fs/ubifs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index a6d42ef..d5b8cb1e 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -969,7 +969,7 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry, struct ubifs_budget_req ino_req = { .dirtied_ino = 1, .dirtied_ino_d = ALIGN(old_inode_ui->data_len, 8) }; struct timespec time; - unsigned int saved_nlink; + unsigned int saved_nlink = 0; /* * Budget request settings: deletion direntry, new direntry, removing