ice: Cleanup fltr list in case of allocation issues
authorRobert Malz <robertx.malz@intel.com>
Fri, 26 Feb 2021 21:19:32 +0000 (13:19 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 29 Mar 2021 17:37:49 +0000 (10:37 -0700)
commitb7eeb52721fe417730fc5adc5cbeeb5fe349ab26
tree70efd5502f872ba6c247b3f54e94e9eeac6b798f
parent3176551979b92b02756979c0f1e2d03d1fc82b1e
ice: Cleanup fltr list in case of allocation issues

When ice_remove_vsi_lkup_fltr is called, by calling
ice_add_to_vsi_fltr_list local copy of vsi filter list
is created. If any issues during creation of vsi filter
list occurs it up for the caller to free already
allocated memory. This patch ensures proper memory
deallocation in these cases.

Fixes: 80d144c9ac82 ("ice: Refactor switch rule management structures and functions")
Signed-off-by: Robert Malz <robertx.malz@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_switch.c