]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-fc: fix initialization order
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Fri, 20 Jan 2023 17:43:54 +0000 (17:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:34:43 +0000 (08:34 +0100)
commit2af93ccd124344e67b52f064c70dd2ee498f61b9
tree783c6bee4832b7eb217787cb46f0df43b9db8bfe
parent6aa5adf831401d2109ad560e3ac8c2820dec2c21
nvme-fc: fix initialization order

[ Upstream commit 98e3528012cd571c48bbae7c7c0f868823254b6c ]

ctrl->ops is used by nvme_alloc_admin_tag_set() but set by
nvme_init_ctrl() so reorder the calls to avoid a NULL pointer
dereference.

Fixes: 648910e88d4e ("nvme-fc: use the tagset alloc/free helpers")
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/fc.c