* [PATCH net] net: stmmac: Fix an error code in probe()
@ 2018-12-17 8:06 Dan Carpenter
2018-12-18 23:50 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-12-17 8:06 UTC (permalink / raw)
To: Giuseppe Cavallaro, Jose Abreu
Cc: Alexandre Torgue, David S. Miller, Maxime Coquelin, netdev,
linux-stm32, kernel-janitors
The function should return an error if create_singlethread_workqueue()
fails.
Fixes: 34877a15f787 ("net: stmmac: Rework and fix TX Timeout code")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 5551fead8f66..c4a35e932f05 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -4250,6 +4250,7 @@ int stmmac_dvr_probe(struct device *device,
priv->wq = create_singlethread_workqueue("stmmac_wq");
if (!priv->wq) {
dev_err(priv->device, "failed to create workqueue\n");
+ ret = -ENOMEM;
goto error_wq;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: stmmac: Fix an error code in probe()
2018-12-17 8:06 [PATCH net] net: stmmac: Fix an error code in probe() Dan Carpenter
@ 2018-12-18 23:50 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-12-18 23:50 UTC (permalink / raw)
To: dan.carpenter
Cc: peppe.cavallaro, Jose.Abreu, alexandre.torgue, mcoquelin.stm32,
netdev, linux-stm32, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 17 Dec 2018 11:06:06 +0300
> The function should return an error if create_singlethread_workqueue()
> fails.
>
> Fixes: 34877a15f787 ("net: stmmac: Rework and fix TX Timeout code")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-18 23:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-17 8:06 [PATCH net] net: stmmac: Fix an error code in probe() Dan Carpenter
2018-12-18 23:50 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).