linux-yocto/drivers/misc
Wang Hai 4d36d0a898 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-21 09:48:08 +02:00
..
altera-stapl altera-stapl: altera_get_note: prevent write beyond end of 'key' 2020-04-02 16:34:14 +02:00
c2port
cb710
cxl cxl: Fix kobject memleak 2020-08-21 09:48:08 +02:00
echo misc: echo: Remove unnecessary parentheses and simplify check for zero 2020-04-24 08:00:51 +02:00
eeprom
genwqe
ibmasm
lis3lv02d
mei mei: bus: don't clean driver pointer 2020-07-22 09:22:27 +02:00
mic mic: avoid statically declaring a 'struct device'. 2020-01-27 14:46:40 +01:00
sgi-gru
sgi-xp misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa 2020-01-27 14:46:36 +01:00
ti-st
vmw_vmci
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
aspeed-lpc-ctrl.c
aspeed-lpc-snoop.c
atmel_tclib.c
atmel-ssc.c misc: atmel-ssc: lock with mutex instead of spinlock 2020-07-22 09:22:28 +02:00
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c scsi: enclosure: Fix stale device oops with hot replug 2020-01-17 19:45:47 +01:00
fsa9480.c
hmc6352.c
hpilo.c
hpilo.h
ics932s401.c
ioc4.c
isl29003.c
isl29020.c
Kconfig
kgdbts.c
lattice-ecp3-config.c
lkdtm_bugs.c
lkdtm_core.c
lkdtm_heap.c
lkdtm_perms.c
lkdtm_refcount.c
lkdtm_rodata.c
lkdtm_usercopy.c
lkdtm.h
Makefile
pch_phub.c
pci_endpoint_test.c misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices 2020-04-13 10:34:24 +02:00
phantom.c
pti.c
qcom-coincell.c
spear13xx_pcie_gadget.c
sram-exec.c
sram.c
sram.h
ti_dac7512.c
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c