diff options
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/pci.c')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/pci.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/pci.c b/drivers/gpu/nvgpu/os/linux/pci.c index 2e456abc..61e412f2 100644 --- a/drivers/gpu/nvgpu/os/linux/pci.c +++ b/drivers/gpu/nvgpu/os/linux/pci.c | |||
@@ -536,6 +536,13 @@ static int nvgpu_pci_init_support(struct pci_dev *pdev) | |||
536 | goto fail; | 536 | goto fail; |
537 | } | 537 | } |
538 | 538 | ||
539 | l->regs_bus_addr = pci_resource_start(pdev, 0); | ||
540 | if (!l->regs_bus_addr) { | ||
541 | nvgpu_err(g, "failed to read register bus offset"); | ||
542 | err = -ENODEV; | ||
543 | goto fail; | ||
544 | } | ||
545 | |||
539 | l->bar1 = nvgpu_devm_ioremap(dev, pci_resource_start(pdev, 1), | 546 | l->bar1 = nvgpu_devm_ioremap(dev, pci_resource_start(pdev, 1), |
540 | pci_resource_len(pdev, 1)); | 547 | pci_resource_len(pdev, 1)); |
541 | if (IS_ERR(l->bar1)) { | 548 | if (IS_ERR(l->bar1)) { |