- return fm;
-error_detach:
- mlx5_flow_meter_detach(fm);
- rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
- fm->mfts->meter_action ? "Meter attr not match" :
- "Meter action create failed");
-error:
- return NULL;
+ rte_spinlock_unlock(&fm->sl);
+ if (ret)
+ rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+ fm->mfts->meter_action ?
+ "Meter attr not match" :
+ "Meter action create failed");
+ return ret ? NULL : fm;