ixgbe: fix crash with empty VF macvlan list
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 6 Oct 2023 12:53:09 +0000 (15:53 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Oct 2023 09:31:50 +0000 (11:31 +0200)
commit7b5add9af567c44e12196107f0fe106e194034fd
tree6290aa64140967d0add841408ae2e89a5acc0c1c
parent1b9d8bc14de6b34e073bea852a8c25a164d1e86e
ixgbe: fix crash with empty VF macvlan list

The adapter->vf_mvs.l list needs to be initialized even if the list is
empty.  Otherwise it will lead to crashes.

Fixes: a1cbb15c1397 ("ixgbe: Add macvlan support for VF")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Link: https://lore.kernel.org/r/ZSADNdIw8zFx1xw2@kadam
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c