From: Vasiliy Kulikov Date: Sun, 5 Sep 2010 18:33:04 +0000 (+0400) Subject: UBIFS: check return code of pnode_lookup X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8c893a5545ca772744376295690723dcb0b47d96;p=openwrt%2Fstaging%2Fblogic.git UBIFS: check return code of pnode_lookup Function pnode_lookup may return ERR_PTR(...). Check for it. Signed-off-by: Vasiliy Kulikov Signed-off-by: Artem Bityutskiy --- 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);