diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c b/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c index 246eba711f15..a72e3b3b596e 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c @@ -485,8 +485,10 @@ int sparx5_register_notifier_blocks(struct sparx5 *s5) goto err_switchdev_blocking_nb; sparx5_owq = alloc_ordered_workqueue("sparx5_order", 0); - if (!sparx5_owq) + if (!sparx5_owq) { + err = -ENOMEM; goto err_switchdev_blocking_nb; + } return 0;