vDPA/ifcvf: alloc the mgmt_dev before the adapter
authorZhu Lingshan <lingshan.zhu@intel.com>
Fri, 25 Nov 2022 14:57:15 +0000 (22:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:55:41 +0000 (13:55 +0100)
commitaa2af9353aeb574f6718b64c1e61de0b53257d7e
tree99679c6b3b601ac6b5a1e080a7f63423179fe70d
parent50da55ec0f04b2f1b20587442bd7b6c0810ab00d
vDPA/ifcvf: alloc the mgmt_dev before the adapter

commit 66e3970b16d1e960afbece65739a3628273633f1 upstream.

This commit reverses the order of allocating the
management device and the adapter. So that it would
be possible to move the allocation of the adapter
to dev_add().

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Cc: stable@vger.kernel.org
Message-Id: <20221125145724.1129962-4-lingshan.zhu@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vdpa/ifcvf/ifcvf_main.c