mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
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>
This commit is contained in:
parent
0e54c8992a
commit
8c893a5545
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user