Orabug:
26194850
As part of updating NVMe driver (Bug
25130845), the nvme device mapping was done
before getting the nvme device information. This change got introduced while
resolving a merge conflict. This caused the kernel panic during nvme probe.
Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
if (!dev->queues)
goto free;
+ dev->dev = get_device(&pdev->dev);
+ pci_set_drvdata(pdev, dev);
+
result = nvme_dev_map(dev);
if (result)
goto free;
INIT_LIST_HEAD(&dev->ctrl.namespaces);
mutex_init(&dev->namespaces_mutex);
- dev->dev = get_device(&pdev->dev);
- pci_set_drvdata(pdev, dev);
-
INIT_WORK(&dev->reset_work, nvme_reset_work);
INIT_WORK(&dev->remove_work, nvme_remove_dead_ctrl_work);
setup_timer(&dev->watchdog_timer, nvme_watchdog_timer,