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)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 21 Feb 2023 00:26:54 +0000 (19:26 -0500)
commit66e3970b16d1e960afbece65739a3628273633f1
tree0a553e1e8c09217006ae9417035ac7cf6e186c3d
parentaf8eb69a62b73a2ce5f91575453534ac07f06eb4
vDPA/ifcvf: alloc the mgmt_dev before the adapter

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>
drivers/vdpa/ifcvf/ifcvf_main.c