2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/rapidio
Haoxiang Li e842f9a1ed rapidio: add check for rio_add_net() in rio_scan_alloc_net()
The return value of rio_add_net() should be checked.  If it fails,
put_device() should be called to free the memory and give up the reference
initialized in rio_add_net().

Link: https://lkml.kernel.org/r/20250227041131.3680761-1-haoxiang_li2024@163.com
Fixes: e6b585ca6e ("rapidio: move net allocation into core code")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Cc: Alexandre Bounine <alex.bou9@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Dan Carpenter <dan.carpenter@linaro.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-03-05 21:36:19 -08:00
..
devices rapidio: fix an API misues when rio_add_net() fails 2025-03-05 21:36:19 -08:00
switches rapidio: remove not used code about RIO_VID_TUNDRA 2021-12-21 10:22:19 +01:00
Kconfig rapidio: remove choice for enumeration 2024-05-14 23:36:19 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rio_cm.c rapidio: make all 'class' structures const 2023-10-05 13:51:35 +02:00
rio-access.c drivers/rapidio/rio-access.c: fix missing include of <linux/rio_drv.h> 2019-12-04 19:44:13 -08:00
rio-driver.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
rio-scan.c rapidio: add check for rio_add_net() in rio_scan_alloc_net() 2025-03-05 21:36:19 -08:00
rio-sysfs.c driver core: bus: mark the struct bus_type for sysfs callbacks as constant 2023-03-23 13:20:40 +01:00
rio.c rapidio: rio: fix possible name leak in rio_register_mport() 2022-11-30 16:13:17 -08:00
rio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00