linux-stable/arch/powerpc/platforms
ruanjinjie e4ff88548d powerpc/pseries: fix possible memory leak in ibmebus_bus_init()
[ Upstream commit afda85b963 ]

If device_register() returns error in ibmebus_bus_init(), name of kobject
which is allocated in dev_set_name() called in device_add() is leaked.

As comment of device_add() says, it should call put_device() to drop
the reference count that was set in device_initialize() when it fails,
so the name can be freed in kobject_cleanup().

Signed-off-by: ruanjinjie <ruanjinjie@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20221110011929.3709774-1-ruanjinjie@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:47:04 +02:00
..
4xx powerpc/4xx/cpm: Fix return value of __setup() handler 2022-06-14 16:53:51 +02:00
8xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
40x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
44x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
52xx treewide: Remove uninitialized_var() usage 2023-08-11 11:33:32 +02:00
82xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
83xx powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe() 2023-01-18 09:26:27 +01:00
85xx powerpc/85xx: Fix oops when mpc85xx_smp_guts_ids node cannot be found 2021-11-26 11:40:24 +01:00
86xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
512x powerpc/mpc512x: fix resource printk format warning 2023-05-17 11:11:44 +02:00
amigaone License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cell powerpc/cell/axon_msi: Fix refcount leak in setup_msi_msg_address 2022-08-25 11:11:26 +02:00
chrp powerpc/chrp/time: Make some functions static, add missing header include 2018-08-03 07:50:30 +02:00
embedded6xx powerpc/wii: fix resource printk format warnings 2023-05-17 11:11:44 +02:00
maple powerpc/maple: Fix declaration made after definition 2020-04-24 08:01:19 +02:00
pasemi License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
powermac powerpc/32s: fix suspend/resume when IBATs 4-7 are used 2019-07-31 07:28:42 +02:00
powernv powerpc/powernv/ioda: Skip unallocated resources when mapping to PE 2023-03-11 16:26:40 +01:00
ps3 powerpc/ps3: Add dma_mask to ps3_dma_region 2021-07-20 16:17:50 +02:00
pseries powerpc/pseries: fix possible memory leak in ibmebus_bus_init() 2023-09-23 10:47:04 +02:00
Kconfig powerpc/tau: Disable TAU between measurements 2020-10-29 09:07:09 +01:00
Kconfig.cputype powerpc/mm/slice: Fix hugepage allocation at hint address on 8xx 2018-06-05 11:42:00 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fsl_uli1575.c