diff options
author | Dan Williams <dan.j.williams@intel.com> | 2024-05-22 00:46:32 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-05-27 12:35:37 +0200 |
commit | 7ff6c798eca05e4a9dcb80163cb454d7787a4bc3 (patch) | |
tree | 69d373315111e6d28bbb9f46930d1b3ac19fd4ae /drivers/acpi | |
parent | ACPI: APEI: EINJ: mark remove callback as __exit (diff) | |
download | linux-7ff6c798eca05e4a9dcb80163cb454d7787a4bc3.tar.xz linux-7ff6c798eca05e4a9dcb80163cb454d7787a4bc3.zip |
ACPI: APEI: EINJ: Fix einj_dev release leak
The platform driver conversion of EINJ mistakenly used
platform_device_del() to unwind platform_device_register_full() at
module exit. This leads to a small leak of one 'struct platform_device'
instance per module load/unload cycle. Switch to
platform_device_unregister() which performs both device_del() and final
put_device().
Fixes: 5621fafaac00 ("EINJ: Migrate to a platform driver")
Cc: 6.9+ <stable@vger.kernel.org> # 6.9+
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Ben Cheatham <Benjamin.Cheatham@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/apei/einj-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c index 9515bcfe5e97..73903a497d73 100644 --- a/drivers/acpi/apei/einj-core.c +++ b/drivers/acpi/apei/einj-core.c @@ -909,7 +909,7 @@ static void __exit einj_exit(void) if (einj_initialized) platform_driver_unregister(&einj_driver); - platform_device_del(einj_dev); + platform_device_unregister(einj_dev); } module_init(einj_init); |