* [PATCH] bdi: Fix error return code in alloc_wbufs()
@ 2020-11-15 8:23 Wang ShaoBo
2020-11-24 7:43 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Wang ShaoBo @ 2020-11-15 8:23 UTC (permalink / raw)
To: richard; +Cc: s.hauer, linux-mtd, linux-kernel, huawei.libin, cj.chengjian
Fix to return PTR_ERR() error code from the error handling case instead
fo 0 in function alloc_wbufs(), as done elsewhere in this function.
Fixes: 6a98bc4614de ("ubifs: Add authentication nodes to journal")
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
---
fs/ubifs/super.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index cb3acfb7dd1f..dacbb999ae34 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -838,8 +838,10 @@ static int alloc_wbufs(struct ubifs_info *c)
c->jheads[i].wbuf.jhead = i;
c->jheads[i].grouped = 1;
c->jheads[i].log_hash = ubifs_hash_get_desc(c);
- if (IS_ERR(c->jheads[i].log_hash))
+ if (IS_ERR(c->jheads[i].log_hash)) {
+ err = PTR_ERR(c->jheads[i].log_hash);
goto out;
+ }
}
/*
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bdi: Fix error return code in alloc_wbufs()
2020-11-15 8:23 [PATCH] bdi: Fix error return code in alloc_wbufs() Wang ShaoBo
@ 2020-11-24 7:43 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2020-11-24 7:43 UTC (permalink / raw)
To: Wang ShaoBo; +Cc: richard, linux-mtd, linux-kernel, huawei.libin, cj.chengjian
On Sun, Nov 15, 2020 at 04:23:43PM +0800, Wang ShaoBo wrote:
> Fix to return PTR_ERR() error code from the error handling case instead
> fo 0 in function alloc_wbufs(), as done elsewhere in this function.
>
> Fixes: 6a98bc4614de ("ubifs: Add authentication nodes to journal")
> Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
> ---
> fs/ubifs/super.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Prefix for this patch should be "ubifs:" rather than "bdi:". With this:
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha
>
> diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
> index cb3acfb7dd1f..dacbb999ae34 100644
> --- a/fs/ubifs/super.c
> +++ b/fs/ubifs/super.c
> @@ -838,8 +838,10 @@ static int alloc_wbufs(struct ubifs_info *c)
> c->jheads[i].wbuf.jhead = i;
> c->jheads[i].grouped = 1;
> c->jheads[i].log_hash = ubifs_hash_get_desc(c);
> - if (IS_ERR(c->jheads[i].log_hash))
> + if (IS_ERR(c->jheads[i].log_hash)) {
> + err = PTR_ERR(c->jheads[i].log_hash);
> goto out;
> + }
> }
>
> /*
> --
> 2.25.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 |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-24 7:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-15 8:23 [PATCH] bdi: Fix error return code in alloc_wbufs() Wang ShaoBo
2020-11-24 7:43 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).