From adc2fa8f071f8e13c95398529078b06389e9e25c Mon Sep 17 00:00:00 2001 From: Rohit Vaswani Date: Thu, 14 Jun 2012 13:03:06 -0700 Subject: [PATCH] ubifs: Fix compiler warning The compiler warns that 'saved_nlink' declared in line 980 may be used uninitialized. Change-Id: Ie725c0efe949213b1281a70c779a3167b1961327 Acked-by: Kaushik Sikdar Signed-off-by: Rohit Vaswani --- 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 ec9f1870ab7..4358a92f4eb 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -977,7 +977,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