mirror-linux/drivers/parisc
Guangshuo Li 707610bccc parisc: led: fix reference leak on failed device registration
When platform_device_register() fails in startup_leds(), the embedded
struct device in platform_leds has already been initialized by
device_initialize(), but the failure path only reports the error and
does not drop the device reference for the current platform device:

  startup_leds()
    -> platform_device_register(&platform_leds)
       -> device_initialize(&platform_leds.dev)
       -> setup_pdev_dma_masks(&platform_leds)
       -> platform_device_add(&platform_leds)

This leads to a reference leak when platform_device_register() fails.
Fix this by calling platform_device_put() after reporting the error.

The issue was identified by a static analysis tool I developed and
confirmed by manual review.

Fixes: 789e527adf ("parisc: led: Rewrite LED/LCD driver to utilizize Linux LED subsystem")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
2026-04-17 15:46:46 +02:00
..
Kconfig parisc: led: Rewrite LED/LCD driver to utilizize Linux LED subsystem 2023-08-28 17:58:14 +02:00
Makefile parisc: Makefile: Adjust order in which drivers should be loaded 2023-08-27 09:17:37 +02:00
README.dino
asp.c parisc: asp: Initialize asp driver via arch_initcall() 2023-08-27 11:09:10 +02:00
ccio-dma.c parisc: update outdated comments for renamed ccio_alloc_consistent() 2026-04-17 11:32:46 +02:00
dino.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
eisa.c parisc: eisa: Convert HP EISA bus driver to use arch_initcall() 2023-08-27 09:17:37 +02:00
eisa_eeprom.c char: misc: Register fixed minor EISA_EEPROM_MINOR in linux/miscdevice.h 2025-08-19 12:41:18 +02:00
eisa_enumerator.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
gsc.c parisc: Do not reprogram affinitiy on ASP chip 2025-11-25 15:23:02 +01:00
gsc.h parisc: Fix CPU affinity for Lasi, WAX and Dino chips 2022-03-29 21:37:12 +02:00
hppb.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
iommu-helpers.h parisc: Convert DMA map_page to map_phys interface 2025-10-29 10:27:30 +01:00
iommu.h parisc: properly type the return value of parisc_walk_tree 2019-02-21 20:37:12 +01:00
iosapic.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
iosapic_private.h parisc: iosapic.c: Fix sparse warnings 2023-08-31 21:42:42 +02:00
lasi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
lba_pci.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
led.c parisc: led: fix reference leak on failed device registration 2026-04-17 15:46:46 +02:00
pdc_stable.c parisc: pdc_stable: Constify struct kobj_type 2024-09-09 08:53:17 +02:00
power.c parisc/power: Move soft-power into power.c 2025-07-23 11:52:48 +02:00
sba_iommu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
superio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
wax.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00

README.dino

/*
** 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"
*/