linux/drivers/misc
Wang Hai db377d8caf cxl: Fix kobject memleak
[ Upstream commit 85c5cbeba8 ]

Currently the error return path from kobject_init_and_add() is not
followed by a call to kobject_put() - which means we are leaking
the kobject.

Fix it by adding a call to kobject_put() in the error path of
kobject_init_and_add().

Fixes: b087e6190d ("cxl: Export optional AFU configuration record in sysfs")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
Link: https://lore.kernel.org/r/20200602120733.5943-1-wanghai38@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-19 08:16:08 +02:00
..
altera-stapl
c2port
cardreader
cb710
cxl cxl: Fix kobject memleak 2020-08-19 08:16:08 +02:00
echo
eeprom
genwqe
habanalabs habanalabs: Align protection bits configuration of all TPCs 2020-07-22 09:33:05 +02:00
ibmasm
lis3lv02d
lkdtm
mei mei: bus: don't clean driver pointer 2020-07-22 09:33:13 +02:00
mic
ocxl
sgi-gru
sgi-xp
ti-st
vmw_vmci
Kconfig
Makefile
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c misc: atmel-ssc: lock with mutex instead of spinlock 2020-07-22 09:33:15 +02:00
atmel_tclib.c
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c
fastrpc.c
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c
isl29003.c
isl29020.c
kgdbts.c
lattice-ecp3-config.c
pch_phub.c
pci_endpoint_test.c
phantom.c
pti.c
pvpanic.c
qcom-coincell.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c
xilinx_sdfec.c misc: xilinx-sdfec: improve get_user_pages_fast() error handling 2020-06-24 17:50:35 +02:00