linux-stable/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
pnpbios PNP: pnpbios: Use list_for_each_entry() instead of list_for_each() 2021-06-09 15:04:30 +02:00
base.h
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
Kconfig
Makefile
manager.c PNP: moved EXPORT_SYMBOL so that it immediately followed its function/variable 2021-06-24 15:55:23 +02:00
quirks.c
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