Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p)
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / nfs / getroot.c
index e6242cdbaf9198147d9b5225ac08cc8df630b001..fae97196daadb74c1dd1c28a5767460557402478 100644 (file)
@@ -96,7 +96,7 @@ struct dentry *nfs_get_root(struct super_block *sb, struct nfs_fh *mntfh)
        inode = nfs_fhget(sb, mntfh, fsinfo.fattr);
        if (IS_ERR(inode)) {
                dprintk("nfs_get_root: get root inode failed\n");
-               return ERR_PTR(PTR_ERR(inode));
+               return ERR_CAST(inode);
        }
 
        error = nfs_superblock_set_dummy_root(sb, inode);
@@ -266,7 +266,7 @@ struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh)
        inode = nfs_fhget(sb, mntfh, &fattr);
        if (IS_ERR(inode)) {
                dprintk("nfs_get_root: get root inode failed\n");
-               return ERR_PTR(PTR_ERR(inode));
+               return ERR_CAST(inode);
        }
 
        error = nfs_superblock_set_dummy_root(sb, inode);