[PATCH] ethernet: myri10ge: Fix missing error code in myri10ge_probe()

Subsystems: myricom myri-10g 10gbe driver (myri10ge), networking drivers, the rest

STALE1894d

2 messages, 2 authors, 2021-06-01 · open the first message on its own page

[PATCH] ethernet: myri10ge: Fix missing error code in myri10ge_probe()

From: Jiapeng Chong <hidden>
Date: 2021-06-01 11:05:09

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'status'.

Eliminate the follow smatch warning:

drivers/net/ethernet/myricom/myri10ge/myri10ge.c:3818 myri10ge_probe()
warn: missing error code 'status'.

Reported-by: Abaci Robot <redacted>
Signed-off-by: Jiapeng Chong <redacted>
---
 drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index c84c8bf..fc99ad8 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -3815,6 +3815,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		dev_err(&pdev->dev,
 			"invalid sram_size %dB or board span %ldB\n",
 			mgp->sram_size, mgp->board_span);
+		status = -EINVAL;
 		goto abort_with_ioremap;
 	}
 	memcpy_fromio(mgp->eeprom_strings,
-- 
1.8.3.1

Re: [PATCH] ethernet: myri10ge: Fix missing error code in myri10ge_probe()

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-06-01 23:00:08

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Tue,  1 Jun 2021 19:04:51 +0800 you wrote:
The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'status'.

Eliminate the follow smatch warning:

drivers/net/ethernet/myricom/myri10ge/myri10ge.c:3818 myri10ge_probe()
warn: missing error code 'status'.

[...]
Here is the summary with links:
  - ethernet: myri10ge: Fix missing error code in myri10ge_probe()
    https://git.kernel.org/netdev/net/c/f336d0b93ae9

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help