From: Shannon Nelson Date: Tue, 27 Jul 2021 17:43:30 +0000 (-0700) Subject: ionic: increment num-vfs before configure X-Git-Tag: v5.15~428^2~375^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73618201acaa17edcf141101af9878d9f16de42a;p=platform%2Fkernel%2Flinux-starfive.git ionic: increment num-vfs before configure Add the new VF to our internal count before we start configuring it. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c index 505f605..7e296fa 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c @@ -165,10 +165,10 @@ static int ionic_vf_alloc(struct ionic *ionic, int num_vfs) goto out; } + ionic->num_vfs++; /* ignore failures from older FW, we just won't get stats */ (void)ionic_set_vf_config(ionic, i, IONIC_VF_ATTR_STATSADDR, (u8 *)&v->stats_pa); - ionic->num_vfs++; } out: