mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 21:15:53 +02:00
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: b81e0f2b58 ("net: airoha: Add FLOW_CLS_STATS callback support")
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250618-check-ret-from-airoha_ppe_foe_get_entry-v2-1-068dcea3cc66@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
fc27ab4890
commit
78bd03ee1f
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user