From: Wei Yongjun Date: Fri, 21 Sep 2012 04:55:02 +0000 (+0800) Subject: hppfs: fix the return value of get_inode() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=91312c53aff4c9863dca6080182091dc5c5824c6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Richard Weinberger --- 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) if (!inode) { dput(dentry); - return ERR_PTR(-ENOMEM); + return NULL; } if (S_ISDIR(dentry->d_inode->i_mode)) {