md/raid5: Cleanup setup_conf() error returns
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 7 Apr 2022 16:57:07 +0000 (10:57 -0600)
committerSong Liu <song@kernel.org>
Mon, 25 Apr 2022 21:00:36 +0000 (14:00 -0700)
commit8fbcba6b999beb9fd0b95cd2efe00a1215e36406
tree1407cad0fb3f92970af5cfb04a89e66fc65c542e
parent92d9aac92b7cc92c770e736c70c3acae7b803278
md/raid5: Cleanup setup_conf() error returns

Be more careful about the error returns. Most errors in this function
are actually ENOMEM, but it forcibly returns EIO if conf has been
allocated.

Instead return ret and ensure it is set appropriately before each goto
abort.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/raid5.c