mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 00:24:12 +08:00
md/raid5: missing error code in setup_conf()
Return -ENOMEM if the allocation fails. Don't return success.
Fixes: 8fbcba6b99
("md/raid5: Cleanup setup_conf() error returns")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Song Liu <song@kernel.org>
This commit is contained in:
parent
957a2b345c
commit
5f7ef4875f
@ -7304,7 +7304,9 @@ static struct r5conf *setup_conf(struct mddev *mddev)
|
||||
goto abort;
|
||||
conf->mddev = mddev;
|
||||
|
||||
if ((conf->stripe_hashtbl = kzalloc(PAGE_SIZE, GFP_KERNEL)) == NULL)
|
||||
ret = -ENOMEM;
|
||||
conf->stripe_hashtbl = kzalloc(PAGE_SIZE, GFP_KERNEL);
|
||||
if (!conf->stripe_hashtbl)
|
||||
goto abort;
|
||||
|
||||
/* We init hash_locks[0] separately to that it can be used
|
||||
|
Loading…
Reference in New Issue
Block a user