aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter2023-11-28 16:13:19 +0300
committerDavid S. Miller2023-12-01 10:57:09 +0000
commit0cd523ee864243c9bdb9d52776613e62b992f6bf (patch)
tree3e350acbe3e1cd58c8a24f996f46d806aebdb14a
parent86b889657a54899442b5742a8d7c85f29668a981 (diff)
octeon_ep: Fix error code in probe()
Set the error code if octep_ctrl_net_get_mtu() fails. Currently the code returns success. Fixes: 0a5f8534e398 ("octeon_ep: get max rx packet length from firmware") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Sathesh B Edara <sedara@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/marvell/octeon_ep/octep_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
index 1a24b3d3cce6..f22fd309a78f 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
@@ -1387,6 +1387,7 @@ static int octep_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (max_rx_pktlen < 0) {
dev_err(&octep_dev->pdev->dev,
"Failed to get max receive packet size; err = %d\n", max_rx_pktlen);
+ err = max_rx_pktlen;
goto register_dev_err;
}
netdev->min_mtu = OCTEP_MIN_MTU;