linux/drivers/dax
Lin Yujun 6a02124c87 ACPI: HMAT: Release platform device in case of platform_device_add_data() fails
The platform device is not released when platform_device_add_data()
fails. And platform_device_put() perfom 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.

Fixes: c01044cc81 ("ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device")
Signed-off-by: Lin Yujun <linyujun809@huawei.com>
Link: https://lore.kernel.org/r/20220914033755.99924-1-linyujun809@huawei.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2022-09-29 17:54:29 -07:00
..
hmem ACPI: HMAT: Release platform device in case of platform_device_add_data() fails 2022-09-29 17:54:29 -07:00
pmem dax: Kill DEV_DAX_PMEM_COMPAT 2021-11-24 19:21:35 -08:00
bus.c Merge branch 'akpm' (patches from Andrew) 2022-01-15 20:37:06 +02:00
bus.h Merge branch 'akpm' (patches from Andrew) 2022-01-15 20:37:06 +02:00
dax-private.h device-dax: add an 'align' attribute 2020-10-13 18:38:28 -07:00
device.c fs: Convert __set_page_dirty_no_writeback to noop_dirty_folio 2022-03-16 13:37:05 -04:00
Kconfig dax: remove CONFIG_DAX_DRIVER 2021-12-04 08:58:51 -08:00
kmem.c dax/kmem: use a single static memory group for a single probed unit 2021-09-08 11:50:23 -07:00
Makefile dax: Kill DEV_DAX_PMEM_COMPAT 2021-11-24 19:21:35 -08:00
pmem.c dax: Kill DEV_DAX_PMEM_COMPAT 2021-11-24 19:21:35 -08:00
super.c dax: Remove usage of the deprecated ida_simple_xxx API 2022-09-29 17:29:27 -07:00