> -----Original Message-----
> From: Alan Brady <[email protected]>
> Sent: Thursday, February 22, 2024 11:05 AM
> To: [email protected]
> Cc: [email protected]; Brady, Alan <[email protected]>; Lobakin,
> Aleksander <[email protected]>
> 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 <[email protected]>
> Signed-off-by: Alan Brady <[email protected]>
> ---
>  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 <[email protected]>

Reply via email to