Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

octeontx2-pf: handle otx2_mbox_get_rsp errors in cn10k.c

Add error pointer check after calling otx2_mbox_get_rsp().

Fixes: 2ca89a2c3752 ("octeontx2-pf: TC_MATCHALL ingress ratelimiting offload")
Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>

authored by

Dipendra Khadka and committed by
Andrew Lunn
ac918302 bd3110bc

+5
+5
drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c
··· 203 203 204 204 rsp = (struct nix_bandprof_alloc_rsp *) 205 205 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 + 206 211 if (!rsp->prof_count[BAND_PROF_LEAF_LAYER]) { 207 212 rc = -EIO; 208 213 goto out;