Skip to content

Commit 0fbc7a5

Browse files
Dipendra333lunn
authored andcommitted
octeontx2-pf: handle otx2_mbox_get_rsp errors in otx2_common.c
Add error pointer check after calling otx2_mbox_get_rsp(). Fixes: ab58a41 ("octeontx2-pf: cn10k: Get max mtu supported from admin function") Signed-off-by: Dipendra Khadka <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Andrew Lunn <[email protected]>
1 parent d811ac1 commit 0fbc7a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,6 +1837,10 @@ u16 otx2_get_max_mtu(struct otx2_nic *pfvf)
18371837
if (!rc) {
18381838
rsp = (struct nix_hw_info *)
18391839
otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr);
1840+
if (IS_ERR(rsp)) {
1841+
rc = PTR_ERR(rsp);
1842+
goto out;
1843+
}
18401844

18411845
/* HW counts VLAN insertion bytes (8 for double tag)
18421846
* irrespective of whether SQE is requesting to insert VLAN

0 commit comments

Comments
 (0)