Skip to contentSkip to conversation

qtnfmac: fix error return code in qtnf_pcie_probe()

PATCH In review Wang Hai 2 participants 2 messages Nov 14, 2020 – Nov 24, 2020

Subsystems (3)
lore
Share & tools
lore

Wang Hai

author
#0 lore raw

PATCH 1/1 qtnfmac: fix error return code in qtnf_pcie_probe()

Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.

Fixes b7da53cd6cd1 ("qtnfmac_pcie: use single PCIe driver for all platforms")
---
 drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c +3 -3
index 5337e67092ca..0f328ce47fee 100644
@@ -299,19 +299,19 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	sysctl_bar = qtnf_map_bar(pdev, QTN_SYSCTL_BAR);
 	if (IS_ERR(sysctl_bar)) {
 		pr_err("failed to map BAR%u\n", QTN_SYSCTL_BAR);
-		return ret;
+		return PTR_ERR(sysctl_bar);
 	}
 
 	dmareg_bar = qtnf_map_bar(pdev, QTN_DMA_BAR);
 	if (IS_ERR(dmareg_bar)) {
 		pr_err("failed to map BAR%u\n", QTN_DMA_BAR);
-		return ret;
+		return PTR_ERR(dmareg_bar);
 	}
 
 	epmem_bar = qtnf_map_bar(pdev, QTN_SHMEM_BAR);
 	if (IS_ERR(epmem_bar)) {
 		pr_err("failed to map BAR%u\n", QTN_SHMEM_BAR);
-		return ret;
+		return PTR_ERR(epmem_bar);
 	}
 
 	chipid = qtnf_chip_id_get(sysctl_bar);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 6 lines · Wang Hai

Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.

Fixes b7da53cd6cd1 ("qtnfmac_pcie: use single PCIe driver for all platforms")

Patch applied to wireless-drivers-next.git, thanks.

31e07aa33fa7 qtnfmac: fix error return code in qtnf_pcie_probe()

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches