Commit 42119dbe authored by Wang ShaoBo's avatar Wang ShaoBo Committed by Richard Weinberger

ubifs: Fix error return code in alloc_wbufs()

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: 6a98bc46 ("ubifs: Add authentication nodes to journal")
Signed-off-by: default avatarWang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 90ada91f
...@@ -838,8 +838,10 @@ static int alloc_wbufs(struct ubifs_info *c) ...@@ -838,8 +838,10 @@ static int alloc_wbufs(struct ubifs_info *c)
c->jheads[i].wbuf.jhead = i; c->jheads[i].wbuf.jhead = i;
c->jheads[i].grouped = 1; c->jheads[i].grouped = 1;
c->jheads[i].log_hash = ubifs_hash_get_desc(c); 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; goto out;
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment