From e1456fb03b35fc4b8d10835c9a468e664d68a388 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Tue, 18 Aug 2020 23:23:52 -0700 Subject: [PATCH] Use correct helper function --- modules/mqnic/mqnic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mqnic/mqnic_main.c b/modules/mqnic/mqnic_main.c index e711862ce..0a48b6d00 100644 --- a/modules/mqnic/mqnic_main.c +++ b/modules/mqnic/mqnic_main.c @@ -175,7 +175,7 @@ static int mqnic_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent goto fail_regions; } - mqnic->hw_regs_size = pci_resource_end(pdev, 0) - pci_resource_start(pdev, 0) + 1; + mqnic->hw_regs_size = pci_resource_len(pdev, 0); mqnic->hw_regs_phys = pci_resource_start(pdev, 0); // Map BAR