kernel: ubifs: Simplify redundant code

cbuf's size can be simply assigned.

Signed-off-by: Liu Song <liu.song11@zte.com.cn>
Reviewed-by: Jiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Liu Song
2018-08-06 10:49:06 +08:00
committed by hanwckf
parent 4901a3ff0d
commit 6c86e01dfb

View File

@ -1236,8 +1236,7 @@ static int mount_ubifs(struct ubifs_info *c)
if (err)
goto out_free;
sz = ALIGN(c->max_idx_node_sz, c->min_io_size);
sz = ALIGN(sz + c->max_idx_node_sz, c->min_io_size);
sz = ALIGN(c->max_idx_node_sz, c->min_io_size) * 2;
c->cbuf = kmalloc(sz, GFP_NOFS);
if (!c->cbuf) {
err = -ENOMEM;