Merge tag 'configfs-for-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/a.hindborg/linux
Pull configfs update from Andreas Hindborg: "Just a very small refactoring to use PTR_ERR_OR_ZERO()" * tag 'configfs-for-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/a.hindborg/linux: configfs: use PTR_ERR_OR_ZERO() to simplify code
This commit is contained in:
+1
-4
@@ -1601,10 +1601,7 @@ static int configfs_dir_open(struct inode *inode, struct file *file)
|
||||
err = -ENOENT;
|
||||
if (configfs_dirent_is_ready(parent_sd)) {
|
||||
file->private_data = configfs_new_dirent(parent_sd, NULL, 0, NULL);
|
||||
if (IS_ERR(file->private_data))
|
||||
err = PTR_ERR(file->private_data);
|
||||
else
|
||||
err = 0;
|
||||
err = PTR_ERR_OR_ZERO(file->private_data);
|
||||
}
|
||||
inode_unlock(d_inode(dentry));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user