Skip to content

Commit

Permalink
f2fs: dereferencing an ERR_PTR
Browse files Browse the repository at this point in the history
There is an error path where "dir" is an ERR_PTR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
  • Loading branch information
Dan Carpenter authored and Jaegeuk Kim committed May 28, 2013
1 parent 6f6fd83 commit f28c06f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/f2fs/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ static int recover_dentry(struct page *ipage, struct inode *inode)
out:
f2fs_msg(inode->i_sb, KERN_NOTICE, "recover_inode and its dentry: "
"ino = %x, name = %s, dir = %lx, err = %d",
ino_of_node(ipage), raw_inode->i_name, dir->i_ino, err);
ino_of_node(ipage), raw_inode->i_name,
IS_ERR(dir) ? 0 : dir->i_ino, err);
return err;
}

Expand Down

0 comments on commit f28c06f

Please sign in to comment.