Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 7ff6c79

Browse files
djbwrafaeljw
authored andcommitted
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: 5621faf ("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>
1 parent 5a87e00 commit 7ff6c79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/apei/einj-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ static void __exit einj_exit(void)
909909
if (einj_initialized)
910910
platform_driver_unregister(&einj_driver);
911911

912-
platform_device_del(einj_dev);
912+
platform_device_unregister(einj_dev);
913913
}
914914

915915
module_init(einj_init);

0 commit comments

Comments
 (0)