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

Add error pointer check after calling otx2_mbox_get_rsp().

Fixes: ab58a416c93f ("octeontx2-pf: cn10k: Get max mtu supported from admin function")
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
0fbc7a50 d811ac14

+4
+4
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
··· 1837 1837 if (!rc) { 1838 1838 rsp = (struct nix_hw_info *) 1839 1839 otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr); 1840 + if (IS_ERR(rsp)) { 1841 + rc = PTR_ERR(rsp); 1842 + goto out; 1843 + } 1840 1844 1841 1845 /* HW counts VLAN insertion bytes (8 for double tag) 1842 1846 * irrespective of whether SQE is requesting to insert VLAN