@@ -886,16 +886,10 @@ static int ath11k_pci_probe(struct pci_dev *pdev,
886886 if (ret )
887887 goto err_pci_disable_msi ;
888888
889- ret = ath11k_pci_set_irq_affinity_hint (ab_pci , cpumask_of (0 ));
890- if (ret ) {
891- ath11k_err (ab , "failed to set irq affinity %d\n" , ret );
892- goto err_pci_disable_msi ;
893- }
894-
895889 ret = ath11k_mhi_register (ab_pci );
896890 if (ret ) {
897891 ath11k_err (ab , "failed to register mhi: %d\n" , ret );
898- goto err_irq_affinity_cleanup ;
892+ goto err_pci_disable_msi ;
899893 }
900894
901895 ret = ath11k_hal_srng_init (ab );
@@ -916,6 +910,12 @@ static int ath11k_pci_probe(struct pci_dev *pdev,
916910 goto err_ce_free ;
917911 }
918912
913+ ret = ath11k_pci_set_irq_affinity_hint (ab_pci , cpumask_of (0 ));
914+ if (ret ) {
915+ ath11k_err (ab , "failed to set irq affinity %d\n" , ret );
916+ goto err_free_irq ;
917+ }
918+
919919 /* kernel may allocate a dummy vector before request_irq and
920920 * then allocate a real vector when request_irq is called.
921921 * So get msi_data here again to avoid spurious interrupt
@@ -924,17 +924,20 @@ static int ath11k_pci_probe(struct pci_dev *pdev,
924924 ret = ath11k_pci_config_msi_data (ab_pci );
925925 if (ret ) {
926926 ath11k_err (ab , "failed to config msi_data: %d\n" , ret );
927- goto err_free_irq ;
927+ goto err_irq_affinity_cleanup ;
928928 }
929929
930930 ret = ath11k_core_init (ab );
931931 if (ret ) {
932932 ath11k_err (ab , "failed to init core: %d\n" , ret );
933- goto err_free_irq ;
933+ goto err_irq_affinity_cleanup ;
934934 }
935935 ath11k_qmi_fwreset_from_cold_boot (ab );
936936 return 0 ;
937937
938+ err_irq_affinity_cleanup :
939+ ath11k_pci_set_irq_affinity_hint (ab_pci , NULL );
940+
938941err_free_irq :
939942 ath11k_pcic_free_irq (ab );
940943
@@ -947,9 +950,6 @@ static int ath11k_pci_probe(struct pci_dev *pdev,
947950err_mhi_unregister :
948951 ath11k_mhi_unregister (ab_pci );
949952
950- err_irq_affinity_cleanup :
951- ath11k_pci_set_irq_affinity_hint (ab_pci , NULL );
952-
953953err_pci_disable_msi :
954954 ath11k_pci_free_msi (ab_pci );
955955
0 commit comments