acpi-hmat-release-platform-device-in-case-of-platform_device_add_data-fails.patch removed from -mm tree
The quilt patch titled
Subject: ACPI: HMAT: release platform device in case of platform_device_add_data() failure
has been removed from the -mm tree. Its filename was
acpi-hmat-release-platform-device-in-case-of-platform_device_add_data-fails.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Lin Yujun <[email protected]>
Subject: ACPI: HMAT: release platform device in case of platform_device_add_data() failure
Date: Wed, 14 Sep 2022 11:37:55 +0800
The platform device is not released when platform_device_add_data() fails. And platform_device_put() performs one more pointer check than put_device() to check for errors in the 'pdev' pointer.
Use platform_device_put() to release platform device in platform_device_add()/platform_device_add_data()/ platform_device_add_resources() error case.
---
drivers/dax/hmem/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dax/hmem/device.c renamed from drivers/dax/hmem/device.c~acpi-hmat-release-platform-device-in-case-of-platform_device_add_data-fails +2 -2
@@ -47,7 +47,7 @@ void hmem_register_device(int target_nid rc =platform_device_add_data (pdev, &info,sizeof (info));if (rc <0 ) {pr_err ("hmem memregion_info allocation failure for %pr\n" , &res); - goto out_pdev; + goto out_resource; } rc =platform_device_add_resources (pdev, &res,1 );
@@ -65,7 +65,7 @@ void hmem_register_device(int target_nidreturn ; out_resource: -put_device (&pdev->dev); +platform_device_put (pdev); out_pdev:memregion_free (id); }
_
Patches currently in -mm which might be from [email protected] are