Skip to content

Commit

Permalink
hppfs: fix the return value of get_inode()
Browse files Browse the repository at this point in the history
In case of error, the function get_inode() returns ERR_PTR().
But the users hppfs_lookup() and hppfs_fill_super() use NULL
test for check the return value, not IS_ERR(), so we'd better
change the return value of get_inode() to NULL instead of
ERR_PTR().

dpatch engine is used to generated this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Wei Yongjun authored and Richard Weinberger committed Oct 9, 2012
1 parent 3be2be0 commit 91312c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/hppfs/hppfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)

if (!inode) {
dput(dentry);
return ERR_PTR(-ENOMEM);
return NULL;
}

if (S_ISDIR(dentry->d_inode->i_mode)) {
Expand Down

0 comments on commit 91312c5

Please sign in to comment.