diff --git a/fs/namei.c b/fs/namei.c index 21988d22399f..f6708ab8ec7e 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2603,7 +2603,7 @@ int path_pts(struct path *path) this.name = "pts"; this.len = 3; child = d_hash_and_lookup(parent, &this); - if (!child) + if (IS_ERR_OR_NULL(child)) return -ENOENT; path->dentry = child;