1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/dsa/ocelot
Zheng Yongjun 866b7a278c net: dsa: felix: fix possible NULL pointer dereference
As the possible failure of the allocation, kzalloc() may return NULL
pointer.
Therefore, it should be better to check the 'sgi' in order to prevent
the dereference of NULL pointer.

Fixes: 23ae3a7877 ("net: dsa: felix: add stream gate settings for psfp").
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20220329090800.130106-1-zhengyongjun3@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-03-30 12:07:38 -07:00
..
felix.c net: dsa: felix: add port mirroring support 2022-03-17 17:42:47 -07:00
felix.h net: dsa: felix: remove prevalidate_phy_mode interface 2022-02-28 11:53:10 +00:00
felix_vsc9959.c net: dsa: felix: fix possible NULL pointer dereference 2022-03-30 12:07:38 -07:00
Kconfig net: dsa: ocelot: felix: utilize shared mscc-miim driver for indirect MDIO access 2021-11-29 13:02:00 +00:00
Makefile net: dsa: seville: build as separate module 2020-09-18 17:52:51 -07:00
seville_vsc9953.c net: dsa: felix: remove prevalidate_phy_mode interface 2022-02-28 11:53:10 +00:00