]> 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)
commit016c903e1c420c6c5ef89994fe930e5ed7c3cb99
tree1407cad0fb3f92970af5cfb04a89e66fc65c542e
parentb1e641013da06e22e16fd9808820481638e52325
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