Commit 0cd523ee authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

octeon_ep: Fix error code in probe()

Set the error code if octep_ctrl_net_get_mtu() fails.  Currently the code
returns success.

Fixes: 0a5f8534 ("octeon_ep: get max rx packet length from firmware")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarSathesh B Edara <sedara@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 86b88965
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment