Commit 8c893a55 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Artem Bityutskiy

UBIFS: check return code of pnode_lookup

Function pnode_lookup may return ERR_PTR(...). Check for it.
Signed-off-by: default avatarVasiliy Kulikov <segooon@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 0e54c899
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment