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 */