--- zzzz-none-000/linux-3.10.107/drivers/net/ethernet/nuvoton/w90p910_ether.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/ethernet/nuvoton/w90p910_ether.c 2021-02-04 17:41:59.000000000 +0000 @@ -922,7 +922,7 @@ { struct w90p910_ether *ether = netdev_priv(dev); struct platform_device *pdev; - char addr[6]; + char addr[ETH_ALEN]; pdev = ether->pdev; @@ -934,7 +934,7 @@ addr[5] = 0xa8; if (is_valid_ether_addr(addr)) - memcpy(dev->dev_addr, &addr, 0x06); + memcpy(dev->dev_addr, &addr, ETH_ALEN); else dev_err(&pdev->dev, "invalid mac address\n"); } @@ -943,7 +943,6 @@ { struct w90p910_ether *ether = netdev_priv(dev); - ether_setup(dev); dev->netdev_ops = &w90p910_ether_netdev_ops; dev->ethtool_ops = &w90p910_ether_ethtool_ops; @@ -1014,7 +1013,7 @@ if (ether->rxirq < 0) { dev_err(&pdev->dev, "failed to get ether rx irq\n"); error = -ENXIO; - goto failed_free_txirq; + goto failed_free_io; } platform_set_drvdata(pdev, dev); @@ -1023,7 +1022,7 @@ if (IS_ERR(ether->clk)) { dev_err(&pdev->dev, "failed to get ether clock\n"); error = PTR_ERR(ether->clk); - goto failed_free_rxirq; + goto failed_free_io; } ether->rmiiclk = clk_get(&pdev->dev, "RMII"); @@ -1049,11 +1048,6 @@ clk_put(ether->rmiiclk); failed_put_clk: clk_put(ether->clk); -failed_free_rxirq: - free_irq(ether->rxirq, pdev); - platform_set_drvdata(pdev, NULL); -failed_free_txirq: - free_irq(ether->txirq, pdev); failed_free_io: iounmap(ether->reg); failed_free_mem: @@ -1076,11 +1070,7 @@ iounmap(ether->reg); release_mem_region(ether->res->start, resource_size(ether->res)); - free_irq(ether->txirq, dev); - free_irq(ether->rxirq, dev); - del_timer_sync(ðer->check_timer); - platform_set_drvdata(pdev, NULL); free_netdev(dev); return 0; @@ -1091,7 +1081,6 @@ .remove = w90p910_ether_remove, .driver = { .name = "nuc900-emc", - .owner = THIS_MODULE, }, };