Skip to content

Commit 2c1ef40

Browse files
committed
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
2 parents 6238729 + 462272d commit 2c1ef40

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

fs/configfs/dir.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,10 +1601,7 @@ static int configfs_dir_open(struct inode *inode, struct file *file)
16011601
err = -ENOENT;
16021602
if (configfs_dirent_is_ready(parent_sd)) {
16031603
file->private_data = configfs_new_dirent(parent_sd, NULL, 0, NULL);
1604-
if (IS_ERR(file->private_data))
1605-
err = PTR_ERR(file->private_data);
1606-
else
1607-
err = 0;
1604+
err = PTR_ERR_OR_ZERO(file->private_data);
16081605
}
16091606
inode_unlock(d_inode(dentry));
16101607

0 commit comments

Comments
 (0)