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 <[email protected]>
---
drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
index 423eec5ff3ad..f2e5c7d80398 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
@@ -1383,6 +1383,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;
--
2.42.0
On Tue, Nov 28, 2023 at 04:13:19PM +0300, Dan Carpenter wrote:
> 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 <[email protected]>
> ---
> drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 1 +
> 1 file changed, 1 insertion(+)
Thanks Dan,
I had noticed this one too.
Reviewed-by: Simon Horman <[email protected]>
...
On Tue, 28 Nov 2023 16:13:19 +0300 Dan Carpenter wrote:
> 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 <[email protected]>
Sathesh, Veerasenareddy, please review. See:
https://docs.kernel.org/next/maintainer/feature-and-driver-maintainers.html#reviews
--
pw-bot: needs-ack
-----Original Message-----
From: Dan Carpenter <[email protected]>
Sent: Tuesday, November 28, 2023 6:43 PM
To: Shinas Rasheed <[email protected]>
Cc: Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [PATCH net-next] 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 <[email protected]>
---
drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
index 423eec5ff3ad..f2e5c7d80398 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
@@ -1383,6 +1383,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;
--
2.42.0
Reviewed-by: Sathesh B Edara <[email protected]>
Hello:
This patch was applied to netdev/net-next.git (main)
by David S. Miller <[email protected]>:
On Tue, 28 Nov 2023 16:13:19 +0300 you wrote:
> 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 <[email protected]>
> ---
> drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 1 +
> 1 file changed, 1 insertion(+)
Here is the summary with links:
- [net-next] octeon_ep: Fix error code in probe()
https://git.kernel.org/netdev/net-next/c/0cd523ee8642
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html