Patch "wifi: ath10k: Fix return value in ath10k_pci_init()" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: ath10k: Fix return value in ath10k_pci_init()

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-ath10k-fix-return-value-in-ath10k_pci_init.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b331aef34203b0748ef94150058179cc240716bd
Author: Xiu Jianfeng <xiujianfeng@xxxxxxxxxx>
Date:   Thu Nov 10 14:19:26 2022 +0800

    wifi: ath10k: Fix return value in ath10k_pci_init()
    
    [ Upstream commit 2af7749047d8d6ad43feff69f555a13a6a6c2831 ]
    
    This driver is attempting to register to support two different buses.
    if either of these is successful then ath10k_pci_init() should return 0
    so that hardware attached to the successful bus can be probed and
    supported. only if both of these are unsuccessful should ath10k_pci_init()
    return an errno.
    
    Fixes: 0b523ced9a3c ("ath10k: add basic skeleton to support ahb")
    Signed-off-by: Xiu Jianfeng <xiujianfeng@xxxxxxxxxx>
    Reviewed-by: Jeff Johnson <quic_jjohnson@xxxxxxxxxxx>
    Signed-off-by: Kalle Valo <quic_kvalo@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221110061926.18163-1-xiujianfeng@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index d96e062647fd..450eb7b31256 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -3381,18 +3381,22 @@ static struct pci_driver ath10k_pci_driver = {
 
 static int __init ath10k_pci_init(void)
 {
-	int ret;
+	int ret1, ret2;
 
-	ret = pci_register_driver(&ath10k_pci_driver);
-	if (ret)
+	ret1 = pci_register_driver(&ath10k_pci_driver);
+	if (ret1)
 		printk(KERN_ERR "failed to register ath10k pci driver: %d\n",
-		       ret);
+		       ret1);
 
-	ret = ath10k_ahb_init();
-	if (ret)
-		printk(KERN_ERR "ahb init failed: %d\n", ret);
+	ret2 = ath10k_ahb_init();
+	if (ret2)
+		printk(KERN_ERR "ahb init failed: %d\n", ret2);
 
-	return ret;
+	if (ret1 && ret2)
+		return ret1;
+
+	/* registered to at least one bus */
+	return 0;
 }
 module_init(ath10k_pci_init);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux