octeontx2-af: Fix uninitialized variables in rvu_switch
authorSubbaraya Sundeep <sbhatta@marvell.com>
Fri, 23 Jul 2021 08:06:18 +0000 (13:36 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jul 2021 16:43:31 +0000 (17:43 +0100)
commit9986066d94c971edf19464ed7bf5b26a91520e97
treee65f921e7a9e8eed73887489929e4ec21a51950c
parent68d1f1d4af188c290087958c75c7b89a816e1137
octeontx2-af: Fix uninitialized variables in rvu_switch

Get the number of VFs of a PF correctly by calling
rvu_get_pf_numvfs in rvu_switch_disable function.
Also hwvf is not required hence remove it.

Fixes: 23109f8dd06d ("octeontx2-af: Introduce internal packet switching")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c