--- zzzz-none-000/linux-3.10.107/drivers/char/hw_random/tx4939-rng.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/char/hw_random/tx4939-rng.c 2021-02-04 17:41:59.000000000 +0000 @@ -110,12 +110,10 @@ struct resource *r; int i; - r = platform_get_resource(dev, IORESOURCE_MEM, 0); - if (!r) - return -EBUSY; rngdev = devm_kzalloc(&dev->dev, sizeof(*rngdev), GFP_KERNEL); if (!rngdev) return -ENOMEM; + r = platform_get_resource(dev, IORESOURCE_MEM, 0); rngdev->base = devm_ioremap_resource(&dev->dev, r); if (IS_ERR(rngdev->base)) return PTR_ERR(rngdev->base); @@ -154,14 +152,12 @@ struct tx4939_rng *rngdev = platform_get_drvdata(dev); hwrng_unregister(&rngdev->rng); - platform_set_drvdata(dev, NULL); return 0; } static struct platform_driver tx4939_rng_driver = { .driver = { .name = "tx4939-rng", - .owner = THIS_MODULE, }, .remove = tx4939_rng_remove, };