diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 086563fe6ed186f9ee1464f74c448bc137bb6353..4d64aee61aea782af944696854ded0b74b98f5be 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1930,12 +1930,6 @@ static void nvme_dev_scan(struct work_struct *work) */ static int nvme_dev_add(struct nvme_dev *dev) { - int res; - - res = nvme_init_identify(&dev->ctrl); - if (res) - return res; - if (!dev->tagset.tags) { dev->tagset.ops = &nvme_mq_ops; dev->tagset.nr_hw_queues = dev->online_queues - 1; @@ -2431,6 +2425,10 @@ static void nvme_probe_work(struct work_struct *work) if (result) goto disable; + result = nvme_init_identify(&dev->ctrl); + if (result) + goto free_tags; + result = nvme_setup_io_queues(dev); if (result) goto free_tags;