summaryrefslogtreecommitdiff
path: root/net/dsa/dsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r--net/dsa/dsa.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 9e1fc0b08290..1fc782fab393 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -344,7 +344,7 @@ static int __init dsa_init_module(void)
rc = dsa_slave_register_notifier();
if (rc)
- return rc;
+ goto register_notifier_fail;
dev_add_pack(&dsa_pack_type);
@@ -352,6 +352,11 @@ static int __init dsa_init_module(void)
THIS_MODULE);
return 0;
+
+register_notifier_fail:
+ destroy_workqueue(dsa_owq);
+
+ return rc;
}
module_init(dsa_init_module);