On Fri, Jun 04, 2021 at 06:02:16PM +0100, Andre Przywara wrote: > +static int __init smccc_trng_dev_init(void) > +{ > + platform_device_register_simple("smccc_trng", -1, NULL, 0); > + > + return 0; > +} > + > +device_initcall(smccc_trng_dev_init); This will leave the device registered if the driver is removed and cause the attempt to register the device again to fail if the module is reloaded. We don't check the error here but I'm not sure the driver core won't complain about that and it's generally icky, better to clean up the device on module removal.
Attachment:
signature.asc
Description: PGP signature