diff options
| author | Lorenzo Bianconi <[email protected]> | 2025-06-18 07:37:40 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-06-19 15:34:13 +0000 |
| commit | 78bd03ee1f20a267d2c218884b66041b3508ac9c (patch) | |
| tree | b7c200f7ed503950de643f1062fe8c751533f493 | |
| parent | NFC: nci: uart: Set tty->disc_data only in success path (diff) | |
| download | kernel-78bd03ee1f20a267d2c218884b66041b3508ac9c.tar.gz kernel-78bd03ee1f20a267d2c218884b66041b3508ac9c.zip | |
net: airoha: Always check return value from airoha_ppe_foe_get_entry()
airoha_ppe_foe_get_entry routine can return NULL, so check the returned
pointer is not NULL in airoha_ppe_foe_flow_l2_entry_update()
Fixes: b81e0f2b58be3 ("net: airoha: Add FLOW_CLS_STATS callback support")
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/20250618-check-ret-from-airoha_ppe_foe_get_entry-v2-1-068dcea3cc66@kernel.org
Signed-off-by: Jakub Kicinski <[email protected]>
| -rw-r--r-- | drivers/net/ethernet/airoha/airoha_ppe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/airoha/airoha_ppe.c b/drivers/net/ethernet/airoha/airoha_ppe.c index 9067d2fc7706..0e217acfc5ef 100644 --- a/drivers/net/ethernet/airoha/airoha_ppe.c +++ b/drivers/net/ethernet/airoha/airoha_ppe.c @@ -809,8 +809,10 @@ airoha_ppe_foe_flow_l2_entry_update(struct airoha_ppe *ppe, int idle; hwe = airoha_ppe_foe_get_entry(ppe, iter->hash); - ib1 = READ_ONCE(hwe->ib1); + if (!hwe) + continue; + ib1 = READ_ONCE(hwe->ib1); state = FIELD_GET(AIROHA_FOE_IB1_BIND_STATE, ib1); if (state != AIROHA_FOE_STATE_BIND) { iter->hash = 0xffff; |
