r8169: remove useless PCI region size check
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 2 Sep 2022 21:16:52 +0000 (23:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Sep 2022 13:26:41 +0000 (14:26 +0100)
Let's trust the hardware here and remove this useless check.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c

index a2ecc9c..f174831 100644 (file)
@@ -5203,12 +5203,6 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                return -ENODEV;
        }
 
-       /* check for weird/broken PCI region reporting */
-       if (pci_resource_len(pdev, region) < R8169_REGS_SIZE) {
-               dev_err(&pdev->dev, "Invalid PCI region size(s), aborting\n");
-               return -ENODEV;
-       }
-
        rc = pcim_iomap_regions(pdev, BIT(region), KBUILD_MODNAME);
        if (rc < 0) {
                dev_err(&pdev->dev, "cannot remap MMIO, aborting\n");