android_kernel_xiaomi_sm8350/drivers/pnp
Yang Yingliang 81b024df47 PNP: fix name memory leak in pnp_alloc_dev()
[ Upstream commit 110d7b0325c55ff3620073ba4201845f59e22ebf ]

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>
2023-01-18 11:40:54 +01:00
..
isapnp
pnpacpi
pnpbios
base.h
card.c
core.c
driver.c
interface.c
Kconfig
Makefile
manager.c
quirks.c
resource.c
support.c
system.c