aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hppfs
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-09-21 00:55:02 -0400
committerRichard Weinberger <richard@nod.at>2012-10-09 16:34:52 -0400
commit91312c53aff4c9863dca6080182091dc5c5824c6 (patch)
treeb1bbd8cec2dca0540584c74b5f7f866b918a03dc /fs/hppfs
parent3be2be0a32c18b0fd6d623cda63174a332ca0de1 (diff)
hppfs: fix the return value of get_inode()
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>
Diffstat (limited to 'fs/hppfs')
-rw-r--r--fs/hppfs/hppfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c
index a68cb2092512..78f21f8dc2ec 100644
--- a/fs/hppfs/hppfs.c
+++ b/fs/hppfs/hppfs.c
@@ -674,7 +674,7 @@ static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)
674 674
675 if (!inode) { 675 if (!inode) {
676 dput(dentry); 676 dput(dentry);
677 return ERR_PTR(-ENOMEM); 677 return NULL;
678 } 678 }
679 679
680 if (S_ISDIR(dentry->d_inode->i_mode)) { 680 if (S_ISDIR(dentry->d_inode->i_mode)) {