From: Hongling Zeng Date: Wed, 20 May 2026 10:15:47 +0000 (+0900) Subject: nilfs2: Fix return in nilfs_mkdir X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5925f33e4fa9ee313d481557607adce8e30ed2e;p=thirdparty%2Flinux.git 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: 88d5baf69082 ("Change inode_operations.mkdir to return struct dentry *") Signed-off-by: Hongling Zeng Signed-off-by: Ryusuke Konishi Signed-off-by: Viacheslav Dubeyko --- diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c index 40ac679ec56e4..e2fe95de3d71c 100644 --- a/fs/nilfs2/namei.c +++ b/fs/nilfs2/namei.c @@ -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);