diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c index e260540eb7c5..71ad870eceac 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; }