/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2020 Broadcom
+ * Copyright(c) 2019-2021 Broadcom
* All rights reserved.
*/
&rptr_index,
&rptr_entry,
&num_of_entries);
- if (rc)
+ if (rc) {
+ /* Free the allocated index before returning */
+ stack_push(pool, index);
return -1;
+ }
PMD_DRV_LOG
- (ERR,
+ (DEBUG,
"%s, Internal entry @ Index:%d rptr_index:0x%x rptr_entry:0x%x num_of_entries:%d\n",
tf_dir_2_str(parms->dir),
index,