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:
|
||
|---|---|---|
| .. | ||
| icssg | ||
| icssm | ||
| Kconfig | ||
| Makefile | ||
| am65-cpsw-ethtool.c | ||
| am65-cpsw-nuss.c | ||
| 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 | ||
| cpsw.h | ||
| cpsw_ale.c | ||
| cpsw_ale.h | ||
| cpsw_ethtool.c | ||
| cpsw_new.c | ||
| cpsw_priv.c | ||
| cpsw_priv.h | ||
| cpsw_sl.c | ||
| cpsw_sl.h | ||
| cpsw_switchdev.c | ||
| cpsw_switchdev.h | ||
| cpts.c | ||
| 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 | ||
| netcp_sgmii.c | ||
| netcp_xgbepcsr.c | ||
| tlan.c | ||
| tlan.h | ||