linux/drivers/net/arcnet
Henry Martin ebebeb58d4 arcnet: Add NULL check in com20020pci_probe()
[ Upstream commit fda8c491db ]

devm_kasprintf() returns NULL when memory allocation fails. Currently,
com20020pci_probe() does not check for this case, which results in a
NULL pointer dereference.

Add NULL check after devm_kasprintf() to prevent this issue and ensure
no resources are left allocated.

Fixes: 6b17a597fc ("arcnet: restoring support for multiple Sohard Arcnet cards")
Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com>
Link: https://patch.msgid.link/20250402135036.44697-1-bsdhenrymartin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-04-10 14:39:34 +02:00
..
arc-rawmode.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
arc-rimi.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
arcdevice.h archnet: Convert from tasklet to BH workqueue 2024-04-08 19:44:09 -07:00
arcnet.c archnet: Convert from tasklet to BH workqueue 2024-04-08 19:44:09 -07:00
capmode.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
com90io.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
com90xx.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
com9026.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
com20020-isa.c net: arcnet: com20020-isa: add missing MODULE_DESCRIPTION() macro 2024-06-19 17:21:12 -07:00
com20020-pci.c arcnet: Add NULL check in com20020pci_probe() 2025-04-10 14:39:34 +02:00
com20020.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
com20020.h arcnet: com20020-pci: add led trigger support 2015-10-26 09:10:56 +01:00
com20020_cs.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
Kconfig net: handle HAS_IOPORT dependencies 2024-04-08 11:56:56 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rfc1051.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
rfc1201.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00