acrn-kernel/arch/mips/sgi-ip27
Lin Yujun 11bec9cba4 MIPS: SGI-IP27: Fix platform-device leak in bridge_platform_create()
In error case in bridge_platform_create after calling
platform_device_add()/platform_device_add_data()/
platform_device_add_resources(), release the failed
'pdev' or it will be leak, call platform_device_put()
to fix this problem.

Besides, 'pdev' is divided into 'pdev_wd' and 'pdev_bd',
use platform_device_unregister() to release sgi_w1
resources when xtalk-bridge registration fails.

Fixes: 5dc76a96e9 ("MIPS: PCI: use information from 1-wire PROM for IOC3 detection")
Signed-off-by: Lin Yujun <linyujun809@huawei.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2022-09-19 16:33:27 +02:00
..
Kconfig
Makefile
Platform
ip27-berr.c
ip27-common.h
ip27-console.c
ip27-hubio.c
ip27-init.c
ip27-irq.c
ip27-klconfig.c
ip27-klnuma.c
ip27-memory.c
ip27-nmi.c
ip27-reset.c
ip27-smp.c
ip27-timer.c
ip27-xtalk.c MIPS: SGI-IP27: Fix platform-device leak in bridge_platform_create() 2022-09-19 16:33:27 +02:00