diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/nvme-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index 87dd4c79e65f..f565212a9e32 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c | |||
@@ -2464,6 +2464,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2464 | if (result) | 2464 | if (result) |
2465 | goto release; | 2465 | goto release; |
2466 | 2466 | ||
2467 | kref_init(&dev->kref); | ||
2467 | result = nvme_dev_start(dev); | 2468 | result = nvme_dev_start(dev); |
2468 | if (result) { | 2469 | if (result) { |
2469 | if (result == -EBUSY) | 2470 | if (result == -EBUSY) |
@@ -2471,7 +2472,6 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2471 | goto release_pools; | 2472 | goto release_pools; |
2472 | } | 2473 | } |
2473 | 2474 | ||
2474 | kref_init(&dev->kref); | ||
2475 | result = nvme_dev_add(dev); | 2475 | result = nvme_dev_add(dev); |
2476 | if (result) | 2476 | if (result) |
2477 | goto shutdown; | 2477 | goto shutdown; |