Skip to contentSkip to conversation

net: stmmac: Fix an error code in probe()

PATCH Applied Dan Carpenter 2 participants 2 messages Dec 17, 2018 – Dec 18, 2018

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

PATCH 1/1 net: stmmac: Fix an error code in probe()

The function should return an error if create_singlethread_workqueue() fails.

Fixes 34877a15f787 ("net: stmmac: Rework and fix TX Timeout code")
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -0
index 5551fead8f66..c4a35e932f05 100644
@@ -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;
 	}
 
Signature · 1 line
2.17.1