From: Richard Weinberger <richard@nod.at>
To: Nathan Chancellor <nathan@kernel.org>
Cc: chengzhihao1 <chengzhihao1@huawei.com>,
linux-mtd <linux-mtd@lists.infradead.org>,
llvm <llvm@lists.linux.dev>, patches <patches@lists.linux.dev>
Subject: Re: [PATCH] ubifs: Fix uninitialized use of err in ubifs_jnl_write_inode()
Date: Fri, 15 Nov 2024 17:46:01 +0100 (CET) [thread overview]
Message-ID: <523439945.25799625.1731689161475.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <20241115-ubifs-fix-uninitialized-err-v1-1-446849982e27@kernel.org>
----- Ursprüngliche Mail -----
> Von: "Nathan Chancellor" <nathan@kernel.org>
> An: "richard" <richard@nod.at>, "chengzhihao1" <chengzhihao1@huawei.com>
> CC: "linux-mtd" <linux-mtd@lists.infradead.org>, "llvm" <llvm@lists.linux.dev>, "patches" <patches@lists.linux.dev>,
> "Nathan Chancellor" <nathan@kernel.org>
> Gesendet: Freitag, 15. November 2024 17:10:04
> Betreff: [PATCH] ubifs: Fix uninitialized use of err in ubifs_jnl_write_inode()
> Clang warns (or errors with CONFIG_WERROR=y):
>
> fs/ubifs/journal.c:986:20: error: variable 'err' is uninitialized when used here
> [-Werror,-Wuninitialized]
> 986 | ubifs_ro_mode(c, err);
> | ^~~
>
> Set err to -EPERM before the call to ubifs_ro_mode() and reuse it in the
> return statement to resolve the warning.
>
> Fixes: 957e1c4e1779 ("ubifs: ubifs_jnl_write_inode: Only check once for the
> limitation of xattr count")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
That was fast, good catch!
Applied to -next.
Thanks,
//richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2024-11-15 16:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 16:10 [PATCH] ubifs: Fix uninitialized use of err in ubifs_jnl_write_inode() Nathan Chancellor
2024-11-15 16:46 ` Richard Weinberger [this message]
2024-11-16 1:57 ` Zhihao Cheng
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=523439945.25799625.1731689161475.JavaMail.zimbra@nod.at \
--to=richard@nod.at \
--cc=chengzhihao1@huawei.com \
--cc=linux-mtd@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=patches@lists.linux.dev \
/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