* Destroy any object allocated by a Devx API. * * @param[in] obj * Pointer to a general object. * * @return * 0 on success, a negative value otherwise. */
| 468 | * 0 on success, a negative value otherwise. |
| 469 | */ |
| 470 | int |
| 471 | mlx5_devx_cmd_destroy(struct mlx5_devx_obj *obj) |
| 472 | { |
| 473 | int ret; |
| 474 | |
| 475 | if (!obj) |
| 476 | return 0; |
| 477 | ret = mlx5_glue->devx_obj_destroy(obj->obj); |
| 478 | mlx5_free(obj); |
| 479 | return ret; |
| 480 | } |
| 481 | |
| 482 | /** |
| 483 | * Query NIC vport context. |
no test coverage detected