diff options
-rw-r--r-- | drivers/block/nvme-core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index ba278ae..c154165 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -2156,6 +2156,9 @@ static int nvme_dev_map(struct nvme_dev *dev) dev->entry[0].vector = pdev->irq; pci_set_master(pdev); bars = pci_select_bars(pdev, IORESOURCE_MEM); + if (!bars) + goto disable_pci; + if (pci_request_selected_regions(pdev, bars, "nvme")) goto disable_pci; |