* @parent: a pointer to the parent dentry of the file.
*
* This function will return a pointer to a dentry if it succeeds. If the file
- * doesn't exist or an error occurs, %ERR_PTR(-ERROR) will be returned. The
- * returned dentry must be passed to dput() when it is no longer needed.
+ * doesn't exist or an error occurs, %NULL will be returned. The returned
+ * dentry must be passed to dput() when it is no longer needed.
*
* If debugfs is not enabled in the kernel, the value -%ENODEV will be
* returned.
struct dentry *dentry;
if (IS_ERR(parent))
- return parent;
+ return NULL;
if (!parent)
parent = debugfs_mount->mnt_root;
dentry = lookup_one_len_unlocked(name, parent, strlen(name));
if (IS_ERR(dentry))
- return dentry;
+ return NULL;
if (!d_really_is_positive(dentry)) {
dput(dentry);
- return ERR_PTR(-EINVAL);
+ return NULL;
}
return dentry;
}