net/bnxt: add external action allocate and free
[dpdk.git] / drivers / net / bnxt / tf_core / tf_identifier.c
index 2113710..2198392 100644 (file)
@@ -159,13 +159,13 @@ tf_ident_free(struct tf *tfp __rte_unused,
        if (rc)
                return rc;
 
-       if (!allocated) {
+       if (allocated != TF_RM_ALLOCATED_ENTRY_IN_USE) {
                TFP_DRV_LOG(ERR,
                            "%s: Entry already free, type:%d, index:%d\n",
                            tf_dir_2_str(parms->dir),
                            parms->type,
                            parms->id);
-               return rc;
+               return -EINVAL;
        }
 
        /* Free requested element */