Skip to contentSkip to conversation

octeon_ep: fix error return code in octep_probe()

PATCH Applied Yang Yingliang 2 participants 2 messages Apr 15, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 octeon_ep: fix error return code in octep_probe()

If register_netdev() fails , it should return error code in octep_probe().

Fixes 862cd659a6fb ("octeon_ep: Add driver framework and device initialization")
---
 drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeon_ep/octep_main.c +2 -1
index 5d39c857ea41..f2af5ebffcf1 100644
@@ -1071,7 +1071,8 @@ static int octep_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	octep_get_mac_addr(octep_dev, octep_dev->mac_addr);
 	eth_hw_addr_set(netdev, octep_dev->mac_addr);
 
-	if (register_netdev(netdev)) {
+	err = register_netdev(netdev);
+	if (err) {
 		dev_err(&pdev->dev, "Failed to register netdev\n");
 		goto register_dev_err;
 	}
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 8 lines · On Fri, 15 Apr 2022 10:39:57 +0800 you wrote:

If register_netdev() fails , it should return error code in octep_probe().

Fixes 862cd659a6fb ("octeon_ep: Add driver framework and device initialization")

[...]

Here is the summary with links:
- [-next] octeon_ep: fix error return code in octep_probe()

    https://git.kernel.org/netdev/net-next/c/0a03f3c511f5

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html