ionic: increment num-vfs before configure

Add the new VF to our internal count before we start configuring it.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Shannon Nelson 2021-07-27 10:43:30 -07:00 committed by David S. Miller
parent e75ccac1d0
commit 73618201ac

View File

@ -165,10 +165,10 @@ static int ionic_vf_alloc(struct ionic *ionic, int num_vfs)
goto out; goto out;
} }
ionic->num_vfs++;
/* ignore failures from older FW, we just won't get stats */ /* ignore failures from older FW, we just won't get stats */
(void)ionic_set_vf_config(ionic, i, IONIC_VF_ATTR_STATSADDR, (void)ionic_set_vf_config(ionic, i, IONIC_VF_ATTR_STATSADDR,
(u8 *)&v->stats_pa); (u8 *)&v->stats_pa);
ionic->num_vfs++;
} }
out: out: