aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter2018-12-17 11:06:06 +0300
committerDavid S. Miller2018-12-18 15:45:28 -0800
commitb26322d2ac6c1c1087af73856531bb836f6963ca (patch)
tree09987d4e2a214333c13405bdf4e65c76aaf334cc
parent3c6306d44082ef007a258ae1b86ea58e6974ee3f (diff)
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") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c1
1 files changed, 1 insertions, 0 deletions
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;
}