Skip to content

Commit b5095f2

Browse files
Fengguang WuMiklos Szeredi
authored andcommitted
ovl: fix ptr_ret.cocci warnings
fs/overlayfs/export.c:459:10-16: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 4b91c30 ("ovl: lookup connected ancestor of dir in inode cache") CC: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
1 parent 7168179 commit b5095f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/overlayfs/export.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ static struct dentry *ovl_lookup_real(struct super_block *sb,
620620
if (err == -ECHILD) {
621621
this = ovl_lookup_real_ancestor(sb, real,
622622
layer);
623-
err = IS_ERR(this) ? PTR_ERR(this) : 0;
623+
err = PTR_ERR_OR_ZERO(this);
624624
}
625625
if (!err) {
626626
dput(connected);

0 commit comments

Comments
 (0)