From: Heiner Kallweit Date: Fri, 2 Sep 2022 21:16:52 +0000 (+0200) Subject: r8169: remove useless PCI region size check X-Git-Tag: microblaze-v6.2~183^2~259 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=36f9b47457f0cad290502c56664df76a2859c9b4;p=linux-2.6-microblaze.git r8169: remove useless PCI region size check Let's trust the hardware here and remove this useless check. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index a2ecc9ceddaa..f17483191454 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -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");