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

Add error pointer check after calling otx2_mbox_get_rsp().

Fixes: 8e67558177f8 ("octeontx2-pf: PFC config support with DCBx")
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
69297b0d f5b942e6

+5
+5
drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c
··· 315 315 if (!otx2_sync_mbox_msg(&pfvf->mbox)) { 316 316 rsp = (struct cgx_pfc_rsp *) 317 317 otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr); 318 + if (IS_ERR(rsp)) { 319 + err = PTR_ERR(rsp); 320 + goto unlock; 321 + } 322 + 318 323 if (req->rx_pause != rsp->rx_pause || req->tx_pause != rsp->tx_pause) { 319 324 dev_warn(pfvf->dev, 320 325 "Failed to config PFC\n");