mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
nilfs2: Fix return in nilfs_mkdir
Return NULL instead of passing zero to ERR_PTR.
Fixes smatch warning:
- fs/nilfs2/namei.c:261 nilfs_mkdir() warn: passing zero to 'ERR_PTR'
Fixes: 88d5baf690 ("Change inode_operations.mkdir to return struct dentry *")
Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
This commit is contained in:
parent
665f192a2a
commit
e5925f33e4
|
|
@ -258,7 +258,7 @@ static struct dentry *nilfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
|||
else
|
||||
nilfs_transaction_abort(dir->i_sb);
|
||||
|
||||
return ERR_PTR(err);
|
||||
return err ? ERR_PTR(err) : NULL;
|
||||
|
||||
out_fail:
|
||||
drop_nlink(inode);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user