mirror-linux/drivers/net/ethernet/ti
Dan Carpenter 5fc7fa743d net: ti: icssm-prueth: unwind cleanly in probe()
This error handling triggers a Smatch warning:

    drivers/net/ethernet/ti/icssm/icssm_prueth.c:1574 icssm_prueth_probe()
    warn: 'prueth->pru1' is an error pointer or valid

The warning is harmless because the pru_rproc_put() function has an
IS_ERR_OR_NULL() check built in.  However, there is a small bug if
syscon_regmap_lookup_by_phandle() fails.  In that case we should call
of_node_put() on eth0_node and eth1_node.

It's a little bit easier to re-write this code to only free things which
we know have been allocated successfully.

Fixes: 511f6c1ae0 ("net: ti: icssm-prueth: Adds ICSSM Ethernet driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Parvathi Pudi <parvathi@couthit.com>
Link: https://patch.msgid.link/aMvVagz8aBRxMvFn@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-19 16:58:25 -07:00
..
icssg net: ti: icssm-prueth: Adds IEP support for PRUETH on AM33x, AM43x and AM57x SOCs 2025-09-14 13:00:54 -07:00
icssm net: ti: icssm-prueth: unwind cleanly in probe() 2025-09-19 16:58:25 -07:00
Kconfig net: ti: icssm-prueth: Adds ICSSM Ethernet driver 2025-09-14 13:00:54 -07:00
Makefile net: ti: icssm-prueth: Adds ICSSM Ethernet driver 2025-09-14 13:00:54 -07:00
am65-cpsw-ethtool.c net: ti: am65-cpsw: Update hw timestamping filter for PTPv1 RX packets 2025-09-18 15:42:28 -07:00
am65-cpsw-nuss.c net: ti: am65-cpsw: Update hw timestamping filter for PTPv1 RX packets 2025-09-18 15:42:28 -07:00
am65-cpsw-nuss.h
am65-cpsw-qos.c
am65-cpsw-qos.h
am65-cpsw-switchdev.c
am65-cpsw-switchdev.h
am65-cpts.c
am65-cpts.h
cpsw-common.c
cpsw-phy-sel.c
cpsw.c net: cpsw: isolate cpsw_ndo_ioctl() to just the old driver 2025-05-14 19:41:46 -07:00
cpsw.h
cpsw_ale.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
cpsw_ale.h
cpsw_ethtool.c
cpsw_new.c net: cpsw: isolate cpsw_ndo_ioctl() to just the old driver 2025-05-14 19:41:46 -07:00
cpsw_priv.c net: cpsw: isolate cpsw_ndo_ioctl() to just the old driver 2025-05-14 19:41:46 -07:00
cpsw_priv.h net: cpsw: isolate cpsw_ndo_ioctl() to just the old driver 2025-05-14 19:41:46 -07:00
cpsw_sl.c
cpsw_sl.h
cpsw_switchdev.c
cpsw_switchdev.h
cpts.c time/timecounter: Fix the lie that struct cyclecounter is const 2025-07-01 15:38:25 +02:00
cpts.h
davinci_cpdma.c
davinci_cpdma.h
davinci_emac.c
davinci_mdio.c
k3-cppi-desc-pool.c
k3-cppi-desc-pool.h
netcp.h
netcp_core.c
netcp_ethss.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
netcp_sgmii.c
netcp_xgbepcsr.c
tlan.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
tlan.h