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 otx2_dmac_flt.c

Add error pointer checks after calling otx2_mbox_get_rsp().

Fixes: 79d2be385e9e ("octeontx2-pf: offload DMAC filters to CGX/RPM block")
Fixes: fa5e0ccb8f3a ("octeontx2-pf: Add support for exact match table.")
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
f5b942e6 ac918302

+9
+9
drivers/net/ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c
··· 28 28 if (!err) { 29 29 rsp = (struct cgx_mac_addr_add_rsp *) 30 30 otx2_mbox_get_rsp(&pf->mbox.mbox, 0, &req->hdr); 31 + if (IS_ERR(rsp)) { 32 + mutex_unlock(&pf->mbox.lock); 33 + return PTR_ERR(rsp); 34 + } 35 + 31 36 *dmac_index = rsp->index; 32 37 } 33 38 ··· 205 200 206 201 rsp = (struct cgx_mac_addr_update_rsp *) 207 202 otx2_mbox_get_rsp(&pf->mbox.mbox, 0, &req->hdr); 203 + if (IS_ERR(rsp)) { 204 + rc = PTR_ERR(rsp); 205 + goto out; 206 + } 208 207 209 208 pf->flow_cfg->bmap_to_dmacindex[bit_pos] = rsp->index; 210 209