]> Git Repo - J-linux.git/commitdiff
ACPI: APEI: EINJ: Fix einj_dev release leak
authorDan Williams <[email protected]>
Tue, 21 May 2024 22:46:32 +0000 (15:46 -0700)
committerRafael J. Wysocki <[email protected]>
Mon, 27 May 2024 10:35:37 +0000 (12:35 +0200)
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+ <[email protected]> # 6.9+
Signed-off-by: Dan Williams <[email protected]>
Reviewed-by: Ben Cheatham <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
drivers/acpi/apei/einj-core.c

index 9515bcfe5e973229139587fc2fbd5077a42cfea6..73903a497d73f7549e913ee00d85507398643464 100644 (file)
@@ -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);
This page took 0.053414 seconds and 4 git commands to generate.