> -----Original Message----- > From: Alan Brady <alan.br...@intel.com> > Sent: Thursday, February 22, 2024 11:05 AM > To: intel-wired-...@lists.osuosl.org > Cc: net...@vger.kernel.org; Brady, Alan <alan.br...@intel.com>; Lobakin, > Aleksander <aleksander.loba...@intel.com> > Subject: [PATCH v6 09/11 iwl-next] idpf: prevent deinit uninitialized virtchnl > core > > In idpf_remove we need to tear down the virtchnl core with > idpf_vc_core_deinit so we can free up resources and leave things in a > good state. However, in the case where we failed to establish VC > communications we may not have ever actually successfully initialized > the virtchnl core. > > This fixes it by setting a bit once we successfully init the virtchnl > core. Then, in deinit, we'll check for it before going on further, > otherwise we just return. Also clear the bit at the end of deinit so we > know it's gone now. > > Tested-by: Alexander Lobakin <aleksander.loba...@intel.com> > Signed-off-by: Alan Brady <alan.br...@intel.com> > --- > drivers/net/ethernet/intel/idpf/idpf.h | 2 ++ > drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 10 ++++++++-- > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/intel/idpf/idpf.h > b/drivers/net/ethernet/intel/idpf/idpf.h
Tested-by: Krishneil Singh <krishneil.k.si...@intel.com>