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:
Hongling Zeng
2026-05-20 11:20:56 -07:00
committed by Viacheslav Dubeyko
parent 665f192a2a
commit e5925f33e4
+1 -1
View File
@@ -258,7 +258,7 @@ out:
else
nilfs_transaction_abort(dir->i_sb);
return ERR_PTR(err);
return err ? ERR_PTR(err) : NULL;
out_fail:
drop_nlink(inode);