Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes:
d6fce5141929 ("net: sparx5: add switching support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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;