kernel_optimize_test/drivers/firmware
Miaoqian Lin 985706bd3b firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle
[ Upstream commit 660ba678f9998aca6db74f2dd912fa5124f0fa31 ]

kobject_init_and_add() takes reference even when it fails.
According to the doc of kobject_init_and_add()

   If this function returns an error, kobject_put() must be called to
   properly clean up the memory associated with the object.

Fix this issue by calling kobject_put().

Fixes: 948af1f0bb ("firmware: Basic dmi-sysfs support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220511071421.9769-1-linmq006@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:32:34 +02:00
..
arm_scmi firmware: arm_scmi: Fix list protocols enumeration in the base protocol 2022-06-09 10:21:15 +02:00
broadcom
efi pstore: Don't use semaphores in always-atomic-context code 2022-04-08 14:39:56 +02:00
google firmware: google: Properly state IOMEM dependency 2022-04-08 14:40:28 +02:00
imx
meson
psci
smccc firmware: smccc: Fix check for ARCH_SOC_ID not implemented 2021-12-01 09:19:04 +01:00
tegra
xilinx
arm_scpi.c
arm_sdei.c
dmi_scan.c
dmi-id.c
dmi-sysfs.c firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle 2022-06-14 18:32:34 +02:00
edd.c
iscsi_ibft_find.c
iscsi_ibft.c
Kconfig
Makefile
memmap.c
pcdp.c
pcdp.h
qcom_scm-legacy.c
qcom_scm-smc.c
qcom_scm.c firmware: qcom: scm: Remove reassignment to desc following initializer 2022-04-08 14:40:06 +02:00
qcom_scm.h
qemu_fw_cfg.c firmware: qemu_fw_cfg: fix kobject leak in probe error path 2022-01-20 09:17:51 +01:00
raspberrypi.c
scpi_pm_domain.c firmware: arm_scpi: Fix string overflow in SCPI genpd driver 2021-12-22 09:30:50 +01:00
stratix10-rsu.c
stratix10-svc.c firmware: stratix10-svc: fix a missing check on list iterator 2022-06-14 18:32:32 +02:00
ti_sci.c
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c