Skip to content

Commit

Permalink
octeontx2-pf: handle otx2_mbox_get_rsp errors
Browse files Browse the repository at this point in the history
Adding error pointer check after calling otx2_mbox_get_rsp().

This is similar to the commit bd3110b
("octeontx2-pf: handle otx2_mbox_get_rsp errors in otx2_flows.c").

Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
Fixes: 6c40ca9 ("octeontx2-pf: Adds TC offload support")
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/20250412183327.3550970-1-chenyuan0y@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Chenyuan Yang authored and Jakub Kicinski committed Apr 16, 2025
1 parent 88fa800 commit 688abe1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/marvell/octeontx2/nic/rep.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ static int rvu_rep_mcam_flow_init(struct rep_dev *rep)

rsp = (struct npc_mcam_alloc_entry_rsp *)otx2_mbox_get_rsp
(&priv->mbox.mbox, 0, &req->hdr);
if (IS_ERR(rsp))
goto exit;

for (ent = 0; ent < rsp->count; ent++)
rep->flow_cfg->flow_ent[ent + allocated] = rsp->entry_list[ent];
Expand Down

0 comments on commit 688abe1

Please sign in to comment.