linux-stable/drivers/parisc
Miaoqian Lin f852afb6c0 parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries
commit d24846a424 upstream.

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 memory leak by calling kobject_put().

Fixes: 73f368cf67 ("Kobject: change drivers/parisc/pdc_stable.c to use kobject_init_and_add")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-27 09:19:53 +01:00
..
asp.c
ccio-dma.c
dino.c
eisa.c
eisa_eeprom.c
eisa_enumerator.c
gsc.c
gsc.h
hppb.c
iommu-helpers.h
iommu.h
iosapic.c
iosapic_private.h
Kconfig
lasi.c
lba_pci.c
led.c
Makefile
pdc_stable.c parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries 2022-01-27 09:19:53 +01:00
power.c
README.dino
sba_iommu.c
superio.c
wax.c

/*
** HP VISUALIZE Workstation PCI Bus Defect
**
** "HP has discovered a potential system defect that can affect
** the behavior of five models of HP VISUALIZE workstations when
** equipped with third-party or customer-installed PCI I/O expansion
** cards. The defect is limited to the HP C180, C160, C160L, B160L,
** and B132L VISUALIZE workstations, and will only be encountered
** when data is transmitted through PCI I/O expansion cards on the
** PCI bus. HP-supplied graphics cards that utilize the PCI bus are
** not affected."
**
** http://h20000.www2.hp.com/bizsupport/TechSupport/Home.jsp?locale=en_US&prodTypeId=12454&prodSeriesId=44443
**
**	Product		First Good Serial Number
**  C200/C240 (US)	US67350000
**B132L+/B180 (US)	US67390000
**   C200 (Europe)	3713G01000
**  B180L (Europe)	3720G01000
**
** Note that many boards were fixed/replaced under a free replacement
** program. Assume a machine is only "suspect" until proven otherwise.
**
** "The pci_check program will also be available as application
**  patch PHSS_12295"
*/