From: Ethan Tidmore Date: Thu, 26 Feb 2026 16:09:05 +0000 (-0600) Subject: ntfs: Add missing error code X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1c85157ea88e87644e171c7ae3e1877f43b4b345;p=thirdparty%2Fkernel%2Flinux.git ntfs: Add missing error code If ntfs_attr_iget() fails no error code is assigned to be returned. Detected by Smatch: fs/ntfs/attrib.c:2665 ntfs_attr_add() warn: missing error code 'err' Signed-off-by: Ethan Tidmore Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon --- diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c index e260540eb7c59..71ad870eceacd 100644 --- a/fs/ntfs/attrib.c +++ b/fs/ntfs/attrib.c @@ -2661,6 +2661,7 @@ add_non_resident: /* Open new attribute and resize it. */ attr_vi = ntfs_attr_iget(VFS_I(ni), type, name, name_len); if (IS_ERR(attr_vi)) { + err = PTR_ERR(attr_vi); ntfs_error(sb, "Failed to open just added attribute"); goto rm_attr_err_out; }