Skip to content

Commit

Permalink
octeon_ep: Fix error code in probe()
Browse files Browse the repository at this point in the history
Set the error code if octep_ctrl_net_get_mtu() fails.  Currently the code
returns success.

Fixes: 0a5f853 ("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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Dec 1, 2023
1 parent 86b8896 commit 0cd523e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/marvell/octeon_ep/octep_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0cd523e

Please sign in to comment.