--- zzzz-none-000/linux-3.10.107/drivers/net/wan/lmc/lmc_main.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/wan/lmc/lmc_main.c 2021-02-04 17:41:59.000000000 +0000 @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include @@ -77,7 +76,7 @@ static int LMC_PKT_BUF_SZ = 1542; -static DEFINE_PCI_DEVICE_TABLE(lmc_pci_tbl) = { +static const struct pci_device_id lmc_pci_tbl[] = { { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, PCI_VENDOR_ID_LMC, PCI_ANY_ID }, { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, @@ -851,6 +850,7 @@ dev = alloc_hdlcdev(sc); if (!dev) { printk(KERN_ERR "lmc:alloc_netdev for device failed\n"); + err = -ENOMEM; goto err_hdlcdev; } @@ -973,7 +973,6 @@ return 0; err_hdlcdev: - pci_set_drvdata(pdev, NULL); kfree(sc); err_kzalloc: pci_release_regions(pdev); @@ -995,7 +994,6 @@ free_netdev(dev); pci_release_regions(pdev); pci_disable_device(pdev); - pci_set_drvdata(pdev, NULL); } } @@ -2126,7 +2124,7 @@ spin_unlock_irqrestore(&sc->lmc_lock, flags); - lmc_trace(dev, "lmc_driver_timout out"); + lmc_trace(dev, "lmc_driver_timeout out"); }