Skip to content

Commit ac91830

Browse files
Dipendra333lunn
authored andcommitted
octeontx2-pf: handle otx2_mbox_get_rsp errors in cn10k.c
Add error pointer check after calling otx2_mbox_get_rsp(). Fixes: 2ca89a2 ("octeontx2-pf: TC_MATCHALL ingress ratelimiting offload") Signed-off-by: Dipendra Khadka <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Andrew Lunn <[email protected]>
1 parent bd3110b commit ac91830

File tree

1 file changed

+5
-0
lines changed
  • drivers/net/ethernet/marvell/octeontx2/nic

1 file changed

+5
-0
lines changed

drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,11 @@ int cn10k_alloc_leaf_profile(struct otx2_nic *pfvf, u16 *leaf)
203203

204204
rsp = (struct nix_bandprof_alloc_rsp *)
205205
otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr);
206+
if (IS_ERR(rsp)) {
207+
rc = PTR_ERR(rsp);
208+
goto out;
209+
}
210+
206211
if (!rsp->prof_count[BAND_PROF_LEAF_LAYER]) {
207212
rc = -EIO;
208213
goto out;

0 commit comments

Comments
 (0)