From: Hyunchul Lee <hyc.lee@gmail.com>
To: Ethan Tidmore <ethantidmore06@gmail.com>
Cc: linkinjeon@kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] ntfs: Add missing error code
Date: Fri, 27 Feb 2026 11:37:24 +0900 [thread overview]
Message-ID: <aaEDZEc0yJwCRDz9@hyunchul-PC02> (raw)
In-Reply-To: <20260226160906.7175-3-ethantidmore06@gmail.com>
On Thu, Feb 26, 2026 at 10:09:05AM -0600, Ethan Tidmore wrote:
> 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 <ethantidmore06@gmail.com>
Looks good to me. Thank for the patch
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
> ---
> fs/ntfs/attrib.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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 @@ int ntfs_attr_add(struct ntfs_inode *ni, __le32 type,
> /* 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;
> }
> --
> 2.53.0
>
--
Thanks,
Hyunchul
next prev parent reply other threads:[~2026-02-27 2:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 16:09 [PATCH 0/3] ntfs: Bug fixes for attrib.c Ethan Tidmore
2026-02-26 16:09 ` [PATCH 1/3] ntfs: Place check before dereference Ethan Tidmore
2026-02-27 2:32 ` Hyunchul Lee
2026-02-26 16:09 ` [PATCH 2/3] ntfs: Add missing error code Ethan Tidmore
2026-02-27 2:37 ` Hyunchul Lee [this message]
2026-02-26 16:09 ` [PATCH 3/3] ntfs: Fix possible deadlock Ethan Tidmore
2026-02-27 2:38 ` Hyunchul Lee
2026-02-27 9:44 ` [PATCH 0/3] ntfs: Bug fixes for attrib.c Namjae Jeon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aaEDZEc0yJwCRDz9@hyunchul-PC02 \
--to=hyc.lee@gmail.com \
--cc=ethantidmore06@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox