WSL2-Linux-Kernel/drivers/pnp
Yang Yingliang c12b314bb2 PNP: fix name memory leak in pnp_alloc_dev()
[ Upstream commit 110d7b0325 ]

After commit 1fa5ae857b ("driver core: get rid of struct device's
bus_id string array"), the name of device is allocated dynamically,
move dev_set_name() after pnp_add_id() to avoid memory leak.

Fixes: 1fa5ae857b ("driver core: get rid of struct device's bus_id string array")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:14:02 +01:00
..
isapnp PNP: moved EXPORT_SYMBOL so that it immediately followed its function/variable 2021-06-24 15:55:23 +02:00
pnpacpi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 150 2019-05-30 11:25:19 -07:00
pnpbios PNP: pnpbios: Use list_for_each_entry() instead of list_for_each() 2021-06-09 15:04:30 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
base.h PNP: Remove pnp_alloc() 2021-05-17 16:54:01 +02:00
card.c Char / Misc driver updates for 5.14-rc1 2021-07-05 13:42:16 -07:00
core.c PNP: fix name memory leak in pnp_alloc_dev() 2022-12-31 13:14:02 +01:00
driver.c bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
interface.c PNP: Remove pnp_alloc() 2021-05-17 16:54:01 +02:00
manager.c PNP: moved EXPORT_SYMBOL so that it immediately followed its function/variable 2021-06-24 15:55:23 +02:00
quirks.c PNP: quirks: Fix duplicate included pci.h 2020-09-25 18:01:06 +02:00
resource.c PNP: Switch over to dev_dbg() 2021-05-17 16:57:18 +02:00
support.c PNP: moved EXPORT_SYMBOL so that it immediately followed its function/variable 2021-06-24 15:55:23 +02:00
system.c