Skip to contentSkip to conversation

wifi: ath11k: fix return value check in ath11k_ahb_probe()

PATCH In review Yang Yingliang 2 participants 2 messages Feb 17, 2023 – Feb 20, 2023 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: ath11k: fix return value check in ath11k_ahb_probe()

ioremap() returns NULL pointer not PTR_ERR() when it fails, so replace the IS_ERR() check with NULL pointer check.

Fixes b42b3678c91f ("wifi: ath11k: remap ce register space for IPQ5018")
---
 drivers/net/wireless/ath/ath11k/ahb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/ahb.c +1 -1
index 920abce9053a..bad3946b44bf 100644
@@ -1174,7 +1174,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
 		 * to a new space for accessing them.
 		 */
 		ab->mem_ce = ioremap(ce_remap->base, ce_remap->size);
-		if (IS_ERR(ab->mem_ce)) {
+		if (!ab->mem_ce) {
 			dev_err(&pdev->dev, "ce ioremap error\n");
 			ret = -ENOMEM;
 			goto err_core_free;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 6 lines · Yang Yingliang

ioremap() returns NULL pointer not PTR_ERR() when it fails, so replace the IS_ERR() check with NULL pointer check.

Fixes b42b3678c91f ("wifi: ath11k: remap ce register space for IPQ5018")

Patch applied to ath-next branch of ath.git, thanks.

342fcde9d914 wifi: ath11k: fix return value check in ath11k_ahb_probe()

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

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


-- 
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k