Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | warning | coding style issues |
Commit Message
Burakov, Anatoly
June 12, 2024, 3 p.m. UTC
From: Ian Stokes <ian.stokes@intel.com> In certain unload conditions the non-standard paths to breaking down the bond supporting resources need special considerations in that there could be nodes moved out of the tree and this can cause a NULL pointer to be passed into the find node by teid function. Add in a NULL pointer check to handle these situations Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com> --- drivers/net/ice/base/ice_sched.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index 74d57329da..af8f8cc7a9 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -56,6 +56,9 @@ ice_sched_find_node_by_teid(struct ice_sched_node *start_node, u32 teid) { u16 i; + if (!start_node) + return NULL; + /* The TEID is same as that of the start_node */ if (ICE_TXSCHED_GET_NODE_TEID(start_node) == teid) return start_node;