From: Sascha Hauer <s.hauer@pengutronix.de>
To: Wang ShaoBo <bobo.shaobowang@huawei.com>
Cc: richard@nod.at, herbert@gondor.apana.org.au,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
huawei.libin@huawei.com, cj.chengjian@huawei.com
Subject: Re: [PATCH] ubifs: Fix error return code in ubifs_init_authentication()
Date: Tue, 24 Nov 2020 08:46:07 +0100 [thread overview]
Message-ID: <20201124074607.GN24489@pengutronix.de> (raw)
In-Reply-To: <20201124063320.1799-1-bobo.shaobowang@huawei.com>
On Tue, Nov 24, 2020 at 02:33:20PM +0800, Wang ShaoBo wrote:
> Fix to return PTR_ERR() error code from the error handling case where
> ubifs_hash_get_desc() failed instead of 0 in ubifs_init_authentication(),
> as done elsewhere in this function.
>
> Fixes: 49525e5eecca5 ("ubifs: Add helper functions for authentication support")
> Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
> ---
> fs/ubifs/auth.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha
>
> diff --git a/fs/ubifs/auth.c b/fs/ubifs/auth.c
> index b93b3cd10bfd..8c50de693e1d 100644
> --- a/fs/ubifs/auth.c
> +++ b/fs/ubifs/auth.c
> @@ -338,8 +338,10 @@ int ubifs_init_authentication(struct ubifs_info *c)
> c->authenticated = true;
>
> c->log_hash = ubifs_hash_get_desc(c);
> - if (IS_ERR(c->log_hash))
> + if (IS_ERR(c->log_hash)) {
> + err = PTR_ERR(c->log_hash);
> goto out_free_hmac;
> + }
>
> err = 0;
>
> --
> 2.17.1
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2020-11-24 7:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 6:33 Wang ShaoBo
2020-11-24 7:46 ` Sascha Hauer [this message]
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=20201124074607.GN24489@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=bobo.shaobowang@huawei.com \
--cc=cj.chengjian@huawei.com \
--cc=herbert@gondor.apana.org.au \
--cc=huawei.libin@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
/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
all inboxes | Powered by JetHome®