VFs are not privileged to issue HWRM_PORT_LED_QCFG/CFG.
There is no need to allocate "bp->leds" memory.
Fixes:
205b74295282 ("net/bnxt: fix allocation of LED config info")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
static void bnxt_free_leds_info(struct bnxt *bp)
{
+ if (BNXT_VF(bp))
+ return;
+
rte_free(bp->leds);
bp->leds = NULL;
}
static int bnxt_alloc_leds_info(struct bnxt *bp)
{
+ if (BNXT_VF(bp))
+ return 0;
+
bp->leds = rte_zmalloc("bnxt_leds",
BNXT_MAX_LED * sizeof(struct bnxt_led_info),
0);