Commit 42e8bf85 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

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

[ Upstream commit b26322d2 ]

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

Fixes: 34877a15 ("net: stmmac: Rework and fix TX Timeout code")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e0280173
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment