nvme: split init identify into helper
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Mon, 1 Mar 2021 02:06:05 +0000 (18:06 -0800)
committerChristoph Hellwig <hch@lst.de>
Thu, 18 Mar 2021 05:17:27 +0000 (06:17 +0100)
commit26494644a40521a213ef9cf385176c8df11126ec
treea1e89d55e29efddcb5f770d86fb29c8b5738df35
parent916ab94db853bbcb81b98414b385eda6b7d77a5e
nvme: split init identify into helper

The function nvme_init_ctrl_finish() (formerly nvme_init_identify()) has
grown over the period of time about ~200 lines given the size of nvme id
ctrl data structure.

Move the nvme_id_ctrl data structure related initilzation into helper
nvme_init_identify() and call it from nvme_init_ctrl_finish().

When we move the code into nvme_init_identify() change the local
variable i from int to unsigned int and remove the duplicate kfree()
after nvme_mpath_init() and jump to the label out_free if
nvme_mpath_ini() fails.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c