diff --git a/fs/namei.c b/fs/namei.c index 0dbe38afef29..60b57e0bc174 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2613,7 +2613,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;