]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb322c93b54e474003e73cfae3369025a2568eea7
tree1407cad0fb3f92970af5cfb04a89e66fc65c542e
parent87acf784fb3097755f93596af041454aea6660ad
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