Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fc6a10f authored by Yue Ma's avatar Yue Ma Committed by Matt Wagantall
Browse files

cnss: Fix a bug to avoid unregistering PCIe device twice



In WLAN driver loading failure routine, it will unregister PCIe device
if it's not unregistered. Currently it checks the incorrect variable
which will still cause double unregister. Fix this bug to avoid crash.

Change-Id: I733582ed8759de7374ac5ea1c2571c78d6142289
CRs-fixed: 818367
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 4ca39891
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1813,7 +1813,7 @@ err_pcie_link_up:
err_pcie_reg:
	cnss_wlan_gpio_set(gpio_info, WLAN_EN_LOW);
	cnss_wlan_vreg_set(vreg_info, VREG_OFF);
	if (pdev) {
	if (penv->pdev) {
		pr_err("%d: Unregistering PCI device\n", __LINE__);
		pci_unregister_driver(&cnss_wlan_pci_driver);
		penv->pdev = NULL;