diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c index 1402c7889e78..3952fdcc9240 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_main.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c @@ -1032,8 +1032,10 @@ static int __init prestera_module_init(void) return -ENOMEM; prestera_owq = alloc_ordered_workqueue("prestera_ordered", 0); - if (!prestera_owq) + if (!prestera_owq) { + destroy_workqueue(prestera_wq); return -ENOMEM; + } return 0; }