summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/lpt_commit.c
diff options
context:
space:
mode:
authorVasiliy Kulikov <segooon@gmail.com>2010-09-05 20:33:04 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-09-07 11:10:43 +0200
commit8c893a5545ca772744376295690723dcb0b47d96 (patch)
tree5e7f31c2b92e335bb6a7856d2229b3abd095d5cb /fs/ubifs/lpt_commit.c
parentUBIFS: check return code of ubifs_lpt_lookup (diff)
downloadlinux-8c893a5545ca772744376295690723dcb0b47d96.tar.xz
linux-8c893a5545ca772744376295690723dcb0b47d96.zip
UBIFS: check return code of pnode_lookup
Function pnode_lookup may return ERR_PTR(...). Check for it. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/lpt_commit.c')
-rw-r--r--fs/ubifs/lpt_commit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index d12535b7fc78..5c90dec5db0b 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -705,6 +705,9 @@ static int make_tree_dirty(struct ubifs_info *c)
struct ubifs_pnode *pnode;
pnode = pnode_lookup(c, 0);
+ if (IS_ERR(pnode))
+ return PTR_ERR(pnode);
+
while (pnode) {
do_make_pnode_dirty(c, pnode);
pnode = next_pnode_to_dirty(c, pnode);