net: tehuti: fix error return code in bdx_probe()
Subsystems (3)
PATCH 1/1 net: tehuti: fix error return code in bdx_probe()
When bdx_read_mac() fails, no error return code of bdx_probe() is assigned.
To fix this bug, err is assigned with -EFAULT as error return code.
Reported-by TOTE Robot <[email protected]>
Signed-off-by Jia-Ju Bai <[email protected]>
--- drivers/net/ethernet/tehuti/tehuti.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/tehuti/tehuti.c +1 -0
@@ -2044,6 +2044,7 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)/*bdx_hw_reset(priv); */ if (bdx_read_mac (priv)) {pr_err ("load MAC address failed\n" ); + err = -EFAULT ; goto err_out_iomap; }SET_NETDEV_DEV (ndev, &pdev->dev);
Signature · 1 line
2.17.1
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 8 lines · On Thu, 4 Mar 2021 18:06:48 -0800 you wrote:
When
bdx_read_mac()fails, no error return code ofbdx_probe()is assigned.
To fix this bug, err is assigned with-EFAULTas error return code.Reported-by TOTE Robot <[email protected]>Signed-off-by Jia-Ju Bai <[email protected]>[...]
Here is the summary with links:
- net: tehuti: fix error return code in bdx_probe()
https://git.kernel.org/netdev/net/c/38c26ff3048a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html