summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-12-17 11:06:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-09 19:38:32 +0300
commit42e8bf856838f26b113b98bbdf8d616540b8033b (patch)
tree7365c419432de84a1e43453d3ff78154ab02e973 /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
parente028017380f03abbb79df182469df5b9fffeb58a (diff)
downloadlinux-42e8bf856838f26b113b98bbdf8d616540b8033b.tar.xz
net: stmmac: Fix an error code in probe()
[ Upstream commit b26322d2ac6c1c1087af73856531bb836f6963ca ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-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 99ea5c4ce29c..2103b865726a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -4247,6 +4247,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;
}